• Resolved Fabio Perri

    (@fabioperri)


    ERRORS & SOLUTION

    Error severity: Very Low

    PHP version affected: From PHP v7.4.x

    Cause of the error: PHP deprecated syntax

    Reference: https://wiki.php.net/rfc/deprecate_curly_braces_array_access

    System specifications: WordPress v5.6 with PHP v7.4.13

    Affected plugin: Heroic Favicon Generator

    Affected file: phpthumb.functions.php

    Path of file: …/wp-content/plugins/favhero-favicon-generator/phpthumb/phpthumb.functions.php

    Affected lines of codes: 212, 989

    ERRORS:

    PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /my-website.com/httpdocs/wp-content/plugins/favhero-favicon-generator/phpthumb/phpthumb.functions.php on line 212

    PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /my-website.com/httpdocs/wp-content/plugins/favhero-favicon-generator/phpthumb/phpthumb.functions.php on line 989

    SOLUTIONS:

    LINE 212
    Change this value:
    $output .= ‘ 0x’.str_pad(dechex(ord($string{$i})), 2, ‘0’, STR_PAD_LEFT);
    With this value:
    $output .= ‘ 0x’.str_pad(dechex(ord($string[$i])), 2, ‘0’, STR_PAD_LEFT);

    LINE 989
    Change this value:
    $strtr_preg_quote[$escapeables{$i}] = $delimiter.$escapeables{$i};
    With this value:
    $strtr_preg_quote[$escapeables[$i]] = $delimiter.$escapeables{$i};

    I have tested this solution several times and it appears to be correct.

    Hoping to have been useful, however, I await confirmation from you.

    Good day and good work.

    • This topic was modified 3 years, 10 months ago by Fabio Perri.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Chris Hadley

    (@chrishadley)

    Hi @fabioperri

    Thanks for your bug report, I appreciate it. I’ve added it to the development tracker for the team to address in the next update.

    All the best,

    Chris

Viewing 1 replies (of 1 total)
  • The topic ‘[ERROR] WP Debug > PHP Deprecated: Array and string offset access syntax …’ is closed to new replies.