Skip to content

Commit

Permalink
FIx for "empty" strings (#50335)
Browse files Browse the repository at this point in the history
Avoid exception passed string is just spaces.
Example: str('   ')->apa() was failing.
  • Loading branch information
tiagof committed Mar 2, 2024
1 parent 96d4512 commit a98f849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ public static function headline($value)
*/
public static function apa($value)
{
if ($value === '') {
if (trim($value) === '') {
return $value;
}

Expand Down

0 comments on commit a98f849

Please sign in to comment.