Skip to content

Commit b080b93

Browse files
authored
Null value for auto-cast field caused deprication warning in php 8.1 (#43706)
See issue !43705
1 parent 1814e80 commit b080b93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ protected function asJson($value)
12001200
*/
12011201
public function fromJson($value, $asObject = false)
12021202
{
1203-
return json_decode($value, ! $asObject);
1203+
return json_decode($value ?? '', ! $asObject);
12041204
}
12051205

12061206
/**

0 commit comments

Comments
 (0)