PHP 8 Error / Incompatibility
-
Dear Support – Thanks for building this wonderful plugin. We recently encountered an error as below
======
“Fatal error: Uncaught Error: imagecreatetruecolor(): Argument #1 ($width) must be of type int, string given
in /wp-content/plugins/leira-letter-avatar/public/class-leira-letter-avatar-public.php on line 644”
=====It seems to be php 8 issue and the plugin need to explicitly cast $width value to integer to fix the issue. I was able to fix it by changing line 575 of wp-content/plugins/leira-letter-avatar/public/class-leira-letter-avatar-public.php
from
$size = isset( $data[‘size’] ) ? $data[‘size’] : 2;to
$size = isset( $data[‘size’] ) ? intval($data[‘size’]) : 2;But we don’t want to change any code in the plugin, so would be great if you can patch and issue an upgraded plugin.
Thanks again for building this wonderful plugin and sharing it with the community.
- The topic ‘PHP 8 Error / Incompatibility’ is closed to new replies.