• Getting this error on frontend

    Notice: Undefined index: snippet_1 in ~/wp-content/plugins/header-footer/plugin.php on line 366
    
    Notice: Undefined index: snippet_2 in ~/wp-content/plugins/header-footer/plugin.php on line 366
    
    Notice: Undefined index: snippet_3 in ~/wp-content/plugins/header-footer/plugin.php on line 366
    
    Notice: Undefined index: snippet_4 in ~/wp-content/plugins/header-footer/plugin.php on line 366
    
    Notice: Undefined index: snippet_5 in ~/wp-content/plugins/header-footer/plugin.php on line 366

    Looking at the code
    $buffer = str_replace('[snippet_' . $i . ']', $hefo_options['snippet_' . $i], $buffer);

    You could resolve it using “isset”.

    https://www.ads-software.com/plugins/header-footer/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Stefano Lissa

    (@satollo)

    Yes, you’re right the code is missing isset. Save the plugin options and the notice should disappear. I’ll add that check.

    Thread Starter M Asif Rahman

    (@asif2bd)

    Thanks, looking for next update.

    I am getting the same issue…

    What should I do with “isset”?

    Plugin Author Stefano Lissa

    (@satollo)

    Checking the code I found that the notice you reported should not appear if you just saved the options at least once. Could you try?

    Thread Starter M Asif Rahman

    (@asif2bd)

    Yes, I use your plugin for quite sometime, but did not had the wp_debug option turned on, as soon as I turned that on, it keep showing this error. You should use isset function, that will solve it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Notice: Undefined index: snippet_i’ is closed to new replies.