8000 [6.x] Fix #35795 (#35797) · laravel/framework@08b1b19 · GitHub
[go: up one dir, main page]

Skip to content

Commit 08b1b19

Browse files
authored
[6.x] Fix #35795 (#35797)
Add an extra is_null check for php 8
1 parent 006180a commit 08b1b19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Illuminate/Validation/Concerns/ValidatesAttributes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ public function validateJson($attribute, $value)
11641164
return false;
11651165
}
11661166

1167-
if (! is_scalar($value) && ! method_exists($value, '__toString')) {
1167+
if (! is_scalar($value) && ! is_null($value) && ! method_exists($value, '__toString')) {
11681168
return false;
11691169
}
11701170

0 commit comments

Comments
 (0)
0