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

pclzip.lib.php warning on 3.0.1 #11335

Closed
tuxmaster opened this issue Feb 12, 2017 · 5 comments
Closed

pclzip.lib.php warning on 3.0.1 #11335

tuxmaster opened this issue Feb 12, 2017 · 5 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Milestone

Comments

@tuxmaster
Copy link

PHP 7.1 using FPM.
OS CentOS 7.3
After update the ReferrersManager plugin to 3.0.2 open the plugin page the follow warning was shown:

WARNING: /var/www/piwik/html/vendor/piwik/decompress/libs/PclZip/pclzip.lib.php(1797): Notice - A non well formed numeric value encountered - Piwik 3.0.1 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)

@Findus23
Copy link
Member

As the error seems to occur in this line: https://github.com/piwik/component-decompress/blob/master/libs/PclZip/pclzip.lib.php#L1797 :
What does PHP return for ini_get('memory_limit') on your server?

@tuxmaster
Copy link
Author

128M

@Findus23
Copy link
Member

I think I found the problem:
$v_memory_limit is a string similar to "128M". $last is then the last character in lowercase (so in this case m).
But in line 1797 the string "128M" (instead of the integer 128) is multiplied with 1048576 to convert it to bytes.
This works, but since PHP 7.1 results in the notice A non well formed numeric value encountered.

See https://3v4l.org/bQpGA

@Findus23
Copy link
Member

Findus23 commented Feb 12, 2017

And it seems like I am not the first to notice matomo-org/component-decompress#9

@mattab
Copy link
Member

mattab commented Feb 20, 2017

fixed in matomo-org/component-decompress#9

@mattab mattab closed this as completed Feb 20, 2017
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Feb 20, 2017
@mattab mattab added this to the 3.0.2 milestone Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

3 participants