Skip to content

Commit 84bd6b7

Browse files
Fixed: deprecated notice with PHP 8.1
As of PHP 8.1, the following notice could possibly appear: Deprecated: strlen(): Passing null to parameter jsonrainbow#1 ($string) of type string is deprecated in ...
1 parent cd26b16 commit 84bd6b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonSchema/Constraints/Constraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function incrementPath(JsonPointer $path = null, $i)
4646
$path = $path->withPropertyPaths(
4747
array_merge(
4848
$path->getPropertyPaths(),
49-
array_filter(array($i), 'strlen')
49+
array_filter(array($i), function ($x) { return $x !== null && strlen($x); })
5050
)
5151
);
5252

0 commit comments

Comments
 (0)