Skip to content

Commit

Permalink
fix: strcmp(): Passing null to parameter #1 ($string1) of type string…
Browse files Browse the repository at this point in the history
… is deprecated (#123)
  • Loading branch information
javiermarinros authored Mar 21, 2023
1 parent 1b8d71d commit e1cca19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NXP/MathExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ static function($a, $b) {
'%' => [static fn($a, $b) => $a % $b, 180, false],
'&&' => [static fn($a, $b) => $a && $b, 100, false],
'||' => [static fn($a, $b) => $a || $b, 90, false],
'==' => [static fn($a, $b) => \is_string($a) || \is_string($b) ? 0 == \strcmp($a, $b) : $a == $b, 140, false],
'!=' => [static fn($a, $b) => \is_string($a) || \is_string($b) ? 0 != \strcmp($a, $b) : $a != $b, 140, false],
'==' => [static fn($a, $b) => \is_string($a) || \is_string($b) ? 0 == \strcmp((string)$a, (string)$b) : $a == $b, 140, false],
'!=' => [static fn($a, $b) => \is_string($a) || \is_string($b) ? 0 != \strcmp((string)$a, (string)$b) : $a != $b, 140, false],
'>=' => [static fn($a, $b) => $a >= $b, 150, false],
'>' => [static fn($a, $b) => $a > $b, 150, false],
'<=' => [static fn($a, $b) => $a <= $b, 150, false],
Expand Down

0 comments on commit e1cca19

Please sign in to comment.