Post by Majnoon » Tue Jan 18, 2022 10:30 am

Hello every one,
I am seeing PHP warnings in my opencart admin error_log. Opencart version is 3.0.3.5 default theme . Php version is 7.3

PHP Warning:

Code: Select all

PHP Warning: imagecopyresampled() expects parameter 1 to be resource, bool given in /home/xxx/public_html/xyz/system/library/image.php on line 182
the code on the line is:

Code: Select all

imagecopyresampled($this->image, $image_old, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->width, $this->height);
PHP Warning:

Code: Select all

PHP Warning: imagecolorallocate() expects parameter 1 to be resource, bool given in /home/xxx/public_html/xyz/system/library/image.php on line 177
the code on the line is:

Code: Select all

$background = imagecolorallocate($this->image, 255, 255, 255);
PHP Warning:

Code: Select all

PHP Warning: imagefilledrectangle() expects parameter 1 to be resource, bool given in /home/xxx/public_html/xyz/system/library/image.php on line 180
the code on the line is:

Code: Select all

imagefilledrectangle($this->image, 0, 0, $width, $height, $background);
PHP Warning:

Code: Select all

PHP Warning: imagecreatetruecolor(): Invalid image dimensions in /home/xxx/public_html/xyz/system/library/image.php on line 169
the code on the line is:

Code: Select all

$this->image = imagecreatetruecolor($width, $height);
Any help is much appreciated.

New member

Posts

Joined
Fri Feb 05, 2021 8:29 pm

Post by by mona » Tue Jan 18, 2022 11:20 am

Do you have image sizes in all of your extension => themes image sizes section ?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Majnoon » Tue Jan 18, 2022 3:18 pm

by mona wrote:
Tue Jan 18, 2022 11:20 am
Do you have image sizes in all of your extension => themes image sizes section ?
If i am not mistaken yes. Does it has to do with some image or heights somewhere? Because this waring doesn't appear every day but once in a while.
So if i follow your line this means there is some page which has the image without size into it ???

New member

Posts

Joined
Fri Feb 05, 2021 8:29 pm

Post by by mona » Wed Jan 19, 2022 7:11 am

You can check if you go to EXTENSION = > THEMES .. there is a list
otherwise you are probably looking at an extension error

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by paulfeakins » Wed Jan 19, 2022 9:15 pm

If the above doesn't solve your problem, you could pay a developer such as ourselves or post a job in the Commercial Support Forum.

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom
Who is online

Users browsing this forum: No registered users and 17 guests