php compatibility

More
1 month 3 weeks ago #52100 by info9838
php compatibility was created by info9838
I use the hot responsive lightbox on kine-ganshoren.be
I have a message error you can  see in attachement.
Is it a php compatibility problem?
If I disable the log errot it doesn't appear, but is it a good idea just for the future?
 

Please Log in to join the conversation.

More
1 month 3 weeks ago #52104 by milos
Replied by milos on topic php compatibility
Hello,

What's your PHP version? Can you paste the error here (I can't see it on the image).

Regards,
Milos

Please Log in to join the conversation.

More
1 month 3 weeks ago #52105 by info9838
Replied by info9838 on topic php compatibility
Hello,

I use joomla 6 and php version 8.3

Deprecated: Implicit conversion from float 450.81967213114757 to int loses precision in /home/kinef476/public_html/kine-ganshoren.be/modules/mod_hot_responsive_lightbox/tmpl/default.php on line 201

Deprecated: Implicit conversion from float 450.81967213114757 to int loses precision in /home/kinef476/public_html/kine-ganshoren.be/modules/mod_hot_responsive_lightbox/tmpl/default.php on line 202

Please Log in to join the conversation.

More
1 month 3 weeks ago #52106 by milos
Replied by milos on topic php compatibility
Hello,

It's a harmless warning that informs you that the rounding of numbers is not 100% precise (it's a matter of 1 pixel). You can get rid of this error if you edit the file default.php and change this line:
Code:
$ResizedImage=imagecreatetruecolor((int)$ResizedWidth,(int)$ResizedHeight); imagecopyresampled($ResizedImage,$ImageSource,0,0,0,0,(int)$ResizedWidth, (int)$ResizedHeight,$ImageWidth,$ImageHeight);

to this:
Code:
$ResizedImage=imagecreatetruecolor((int) round($ResizedWidth),(int) round($ResizedHeight)); imagecopyresampled($ResizedImage,$ImageSource,0,0,0,0,(int) round($ResizedWidth), (int) round($ResizedHeight),$ImageWidth,$ImageHeight);

Regards,
Milos

Please Log in to join the conversation.

More
1 month 3 weeks ago #52107 by info9838
Replied by info9838 on topic php compatibility
Sorry just for one pixel...
Everything is ok now

Best regards,
Michael

Please Log in to join the conversation.

Time to create page: 0.221 seconds
Powered by Kunena Forum