-
Notifications
You must be signed in to change notification settings - Fork 114
PHP7 incompatibility - several uses of &new in /lib #8
Comments
Just noticed technically 3 of those are in comments, so lib/PEAR/XML/Parser/Simple.php and lib/PEAR/HTTP/Request.php are ok. |
Registry.php can probably be ignored, since the problematic code is in a code path commented with "never used". :-) |
Sorry forgot to reply to this. Not encountered any issue in practice with this code, but it does block compilation of all PHP files which is not the end of the world, but can be a bit annoying if you want everything compiled. |
I had time to play with this now - it seems this code can be trivially fixed by replacing |
Hi,
When trying to compile all of the PHP files under Magento using OpCache I ran into some issues, namely that there are several places under /lib where the result of a new statement is assigned to a variable by reference. This was depreciated in PHP 5.6 and is now a parsing error in 7.x, and blocks compilation.
http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.other.new-by-ref
Affected files (Magento CE 1.9.2.2):
There is nothing under /app that is uses &new - so that's safe.
I was going to submit a pull request for this, but since it affects core files that can't be extended (without some trickery) I thought best to simply post this issue so people will be aware.
The text was updated successfully, but these errors were encountered: