profile-case.php, prevent saving empty array

And some regex