Closed ernilambar closed 4 years ago
This is odd as it should work as-is. PHP will probably (should) cast the integer value of PHP_VERSION_ID
to string when doing the comparison.
Yes, its odd. And I have also seen this first time.
version_compare(70402, '70000', '<')
and this is giving fatal error.
May be @jrfnl have some idea about this issue.
This could (should) only happen if strict types is being enforced, which AFAIK, it isn't in this application. See: https://3v4l.org/17GkX
So how are you invoking the application or is there anything in your setup which is causing strict types to be in effect ?
@jrfnl We are using strict_types
. https://github.com/WPTT/theme-sniffer/blob/development/src/class-plugin.php#L8
Ok, this is then an overlook on my part. Totally forgot about strict types 🙈
Ah, well, that explains it :grinning:
Cast PHP version as string
Fix #204