Skip to content

Commit

Permalink
fix invalid comparison operator
Browse files Browse the repository at this point in the history
fixes "PHP Fatal error:  Uncaught ValueError: version_compare(): Argument #3 ($operator) must be a valid comparison operator" error message under PHP 8.0
  • Loading branch information
esler committed May 12, 2021
1 parent 6ad8150 commit 3f2af6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/Zend/Xml/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ public static function scanFile($file, DOMDocument $dom = null)
public static function isPhpFpm()
{
$isVulnerableVersion = (
version_compare(PHP_VERSION, '5.5.22', 'lt')
version_compare(PHP_VERSION, '5.5.22', '<')
|| (
version_compare(PHP_VERSION, '5.6', 'gte')
&& version_compare(PHP_VERSION, '5.6.6', 'lt')
version_compare(PHP_VERSION, '5.6', '>=')
&& version_compare(PHP_VERSION, '5.6.6', '<')
)
);

Expand Down

0 comments on commit 3f2af6c

Please sign in to comment.