Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit 1046f0c

Browse files
authored
Cast value as string when using trim
1 parent 1eeb754 commit 1046f0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Casts/EfficientUuid.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class EfficientUuid implements CastsAttributes
1818
*/
1919
public function get($model, string $key, $value, array $attributes)
2020
{
21-
if (trim($value) === '') {
21+
if (trim((string) $value) === '') {
2222
return;
2323
}
2424

@@ -36,7 +36,7 @@ public function get($model, string $key, $value, array $attributes)
3636
*/
3737
public function set($model, string $key, $value, array $attributes)
3838
{
39-
if (trim($value) === '') {
39+
if (trim((string) $value) === '') {
4040
return;
4141
}
4242

0 commit comments

Comments
 (0)