• Resolved bekind

    (@pkverma99)


    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.

Viewing 1 replies (of 1 total)
  • Plugin Author Ariel

    (@arielhr1987)

    Hi @pkverma99

    Thanks for sharing the error and the fix for it.
    I have released a new version of the plugin with the fix

    Kind regards!

Viewing 1 replies (of 1 total)
  • The topic ‘PHP 8 Error / Incompatibility’ is closed to new replies.