Microthemer and PHP 7

Tagged: 

Author Posts

katw

Hi,

I just ran a compatibility test for PHP 7.1 and Microthemer was flagged as having an issue with PHP changes.

You probably are aware, but in case you are not the info is below.

If a false positive let me know and I will alert the PHP test plugin owner.

The info given was:

FILE: /plugins/microthemer/includes/scssphp/scssphp-july-2018/src/SourceMap/Base64VLQEncoder.php
------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
------------------------------------------------------
 179 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
 179 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
 179 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
-----------------------------------------------------

Sebastian

Hey,

Thanks for raising this. I found a few sites that say this is a false alarm:

https://wordpress.org/support/topic/php-7-1-compatibility-error-3/
https://github.com/PHPCompatibility/PHPCompatibility/issues/294

The most up to date version of the SCSSPHP library still uses the code being flagged:

public function zeroFill($a, $b)
{
        return ($a >= 0) ? ($a >> $b) : ($a >> $b) & (PHP_INT_MAX >> ($b - 1));
}

So I think it’s OK. Also, I currently run PHP 7.1 on my development server and the SCSS feature works fine.

I would rather MT passed the PHP7 test though. So I’ve raised an issue on GitHub. Hopefully I’ll hear back soon.

Cheers!
Sebastian


katw

Hi Sebastian,

If the error is a non-event I suggest you let the author of php-compatibility-checker know so he can whitelist Microthemer.

Cheers

Kat


Sebastian

Hey Kat,

I’ve actually been talking to the developer of SCSS PHP on github and have implemented a potential workaround. I’m just testing it before releasing. But if there are no issues with the workaround, MT will hopefully pass the compatibility checker.

Cheers!
Sebastian

You must login or register to reply to this topic.