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

Warning - imagecopyresampled() expects parameter 2 to be resource #7264

Closed
palleroy0 opened this issue Feb 21, 2015 · 1 comment
Closed

Warning - imagecopyresampled() expects parameter 2 to be resource #7264

palleroy0 opened this issue Feb 21, 2015 · 1 comment
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it. Bug For errors / faults / flaws / inconsistencies etc. c: Usability For issues that let users achieve a defined goal more effectively or efficiently.
Milestone

Comments

@palleroy0
Copy link

I received this message after upgrading to 2.11.0 and adding a custom logo. The image failed to validate with pngcheck. It must have gotten corrupted during conversion. Uploading random files with non-.png suffixes did not produce the error. I labeled a .jpg with .png and produced the error.

Verifying the image was a valid PNG fixed any issue.

WARNING CoreAdminHome[2015-02-19 04:42:12] [fcf03] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(223): Warning - imagecopyresampled() expects parameter 2 to be resource, boolean given - Piwik 2.11.0 - Please report this message in the Piwik forums: [forum.piwik.org](please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-19 05:03:38] [01db7] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(202): Warning - imagecreatefrompng(): '/tmp/phpEfv0yj' is not a valid PNG file - Piwik 2.11.0 - Please report this message in the Piwik forums: [forum.piwik.org](please do a search first as it might have been reported already)

Putting the .png suffix on a text file generated other errors.

WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(221): Warning - imagecolortransparent() expects parameter 1 to be resource, boolean given - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(223): Warning - imagecopyresampled() expects parameter 1 to be resource, boolean given - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(224): Warning - imagepng() expects parameter 1 to be resource, boolean given - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(220): Warning - imagecolorallocate() expects parameter 1 to be resource, boolean given - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(217): Warning - imagesavealpha() expects parameter 1 to be resource, boolean given - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(211): Warning - Division by zero - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(213): Warning - imagecreatetruecolor(): Invalid image dimensions - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(216): Warning - imagealphablending() expects parameter 1 to be resource, boolean given - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)
WARNING CoreAdminHome[2015-02-21 18:15:22] [5a2f3] /www/piwik/plugins/CoreAdminHome/CustomLogo.php(202): Warning - imagecreatefrompng(): '/tmp/phpB7EnAK' is not a valid PNG file - Piwik 2.11.0 - Please report this message in the Piwik forums: http://forum.piwik.org (please do a search first as it might have been reported already)

http://forum.piwik.org/read.php?2,124339,124384

@mattab mattab added Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. labels Apr 8, 2015
@mattab mattab added this to the Mid term milestone Apr 8, 2015
@mattab
Copy link
Member

mattab commented Apr 8, 2015

Thanks @palleroy0 for the suggestion, we could improve the messaging to make it clear to user that the image had an invalid format.

@sgiehl sgiehl self-assigned this Jan 4, 2016
@mattab mattab added Bug For errors / faults / flaws / inconsistencies etc. and removed Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. labels Jan 30, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. Bug For errors / faults / flaws / inconsistencies etc. c: Usability For issues that let users achieve a defined goal more effectively or efficiently.
Projects
None yet
Development

No branches or pull requests

3 participants