• Resolved ceslad

    (@ceslad)


    I updated the plugin to the latest version (2.4.1). Since then, the following message appears in the wordpress editor for autoptimize:

    Warning: array_key_exists() expects parameter 2 to be array, null given in /web/wp-content/plugins/autoptimize/classes/autoptimizeExtra.php on line 640

    What does this mean and how do I solve this problem?

    Thank you.

    • This topic was modified 7 years, 7 months ago by ceslad.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    as it’s just a warning you can safely ignore this ceslad, but *i think* this would go away when saving options on the autoptimize -> extra settings page.

    hope this helps,
    frank

    Thread Starter ceslad

    (@ceslad)

    Olá, @optimizingmatters.

    I went to <settings> <extra> <save changes>, but the message still appears in the editor.

    What does that really mean? I would like to delete this message. Is there any how?

    Thanks in advance Franco

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, try this; open wp-content/plugins/autoptimize/classes/autoptimizeExtra.php and on line 640 change

    if ( $has_launched || ( array_key_exists( 'launch-threshold', $avail_imgopt ) && $magic_number < $avail_imgopt['launch-threshold'] ) ) {

    into

    if ( $has_launched || ( is_array( $avail_imgopt ) && array_key_exists( 'launch-threshold', $avail_imgopt ) && $magic_number < $avail_imgopt['launch-threshold'] ) ) {

    let me know if that helps 🙂

    frank

    Thread Starter ceslad

    (@ceslad)

    Hy, Franco, @optimizingmatters

    The message has disappeared. This replacement of one code by another has solved.

    The message that appeared may be because the code was already obsolete. Would it be this?

    Anyway, thank you for your attention and for helping me resolve the issue..

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    great, I’ll make sure this goes in the next version ceslad!

    and feel free to leave a review of the plugin and support here! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Autoptimize. Message error in new version’ is closed to new replies.