Skip to content

Commit c9d2ba0

Browse files
lava83stefan.riedel
and
stefan.riedel
authored
[11.x] Stringable is also an interface of symfony (#51309)
* filled and blank works with `Stringable` * unnecessary * `Stringable` is also an interface from symfony and is implemented on models. So if we check a model if a model is filled it except an error: Call to undefined method App\\Model::trim(). So we use now explicit Illuminate\Support\Stringable * reduce compare to native trim - function * unnused Model --------- Co-authored-by: stefan.riedel <[email protected]>
1 parent 580ffe1 commit c9d2ba0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Support/helpers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function blank($value)
6161
}
6262

6363
if ($value instanceof Stringable) {
64-
return $value->trim()->toString() === '';
64+
return trim((string) $value) === '';
6565
}
6666

6767
return empty($value);

0 commit comments

Comments
 (0)