Warning - imagecopyresampled() expects parameter 2 to be resource


#1

I received this message after upgrading to 2.11.0 and adding a custom logo.


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: http://forum.piwik.org (please do a search first as it might have been reported already)

edit:
I have reproduced this error when Piwik did not like the png file and I received the following error.


WARNING CoreAdminHome[2015-02-19 05:03:38] [01db7] /www/home/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: http://forum.piwik.org (please do a search first as it might have been reported already)


(Matthieu Aubry) #2

Hi there, can you please create an issue at: Issues · matomo-org/piwik · GitHub
and add a link to the png image that we can use to reproduce this bug?


#3

Issue #7264

The image was an invalid PNG file. Verifying the validity of the PNG before upload fixed any issue.

Thanks, Matt, for all your hard work. I really appreciate Piwik!