From cd54300ab46e914a023d09261910e7131835072c Mon Sep 17 00:00:00 2001 From: Tiago Fernandes Date: Fri, 1 Mar 2024 21:51:39 +0000 Subject: [PATCH] FIx for "empty" strings Avoid exception passed string is just spaces. Example: str(' ')->apa() was failing. --- src/Illuminate/Support/Str.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Support/Str.php b/src/Illuminate/Support/Str.php index 1a27bd1f48f1..ed1f1b5d6834 100644 --- a/src/Illuminate/Support/Str.php +++ b/src/Illuminate/Support/Str.php @@ -1298,7 +1298,7 @@ public static function headline($value) */ public static function apa($value) { - if ($value === '') { + if (trim($value) === '') { return $value; }