Change version_compare to use a correct operator
Closed this issue ยท 2 comments
Emanuel-23 commented
I know this repo is not actively maintained (UNFORTUNATELY!!) but for those who might need it or maybe if the author is willing to fix this anyway (please ๐ ):
polylang-slug/polylang-slug.php
Line 31 in f521168
the used operator is incorrect. the operator should be one of the following: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>
. Thats why version_compare will always return null
;
see php.net -> version-compare
nomedia commented
thanks,remove this line it works.
rwkyyy commented
if you arrived here because of an PHP error on line 31; in PHP 8.x, the solution is simmple:
either you change the operators from =<
to <=
OR
you remove line 31 (I suggest comment);
both solve the issue.