Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.1 Compatibility #65

Open
CaelanStewart opened this issue Sep 1, 2017 · 4 comments
Open

PHP 7.1 Compatibility #65

CaelanStewart opened this issue Sep 1, 2017 · 4 comments

Comments

@CaelanStewart
Copy link

Upon using AIOM in a PHP 7.1 environment, I am now seeing several warnings and notices appearing.

Warning: A non-numeric value encountered in AllInOneMinify.module on line 713

Upon further inspection, the variable $_timestamp is initialised as '' rather than 0. Therefore the new notices that PHP issues when arithmetic is performed on non numeric values pop up.

The other error I saw is:

Notice: A non well formed numeric value encountered in cssmin.php on line 769

Upon further inspection, I can see that the variable $size is an integer in the form of a string, and is sometimes suffixed with a unit. That unit is not removed before $size is implicitly casted to an integer during the arithmetic seen on that line.

None of issues actually cause any real problems, it's just nice knowing that there are no errors being issued whatsoever.

@mikerockett
Copy link

Just bumped into this as well...

@digitalbricks
Copy link

I just encountered the same problem here. No issues with PHP 7.0 but with 7.1.
And because PHP warning is echoed inside the link- an script-tags, the browser isn't able to render the page correctly if PW is in debug mode (via config.php).

@matjazpotocnik
Copy link

I have a forked version at https://github.com/matjazpotocnik/ProcessWire-AIOM-All-In-One-Minify that includes a lot of pull requests and fixes from several contributors. I didn't test this enough, so use it on your dev site!!!

@digitalbricks
Copy link

@matjazpotocnik Thanks for the hint to your fork – i will give it a try on the next project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants