Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add an extra is_null check for php 8
  • Loading branch information
Joorren committed Jan 6, 2021
1 parent 74f1bdc commit 9d537bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/Concerns/ValidatesAttributes.php
Expand Up @@ -1146,7 +1146,7 @@ public function validateJson($attribute, $value)
return false;
}

if (! is_scalar($value) && ! method_exists($value, '__toString')) {
if (! is_scalar($value) && ! is_null($value) && ! method_exists($value, '__toString')) {
return false;
}

Expand Down

0 comments on commit 9d537bd

Please sign in to comment.