• Resolved flacoman91

    (@flacoman91)


    latest version is throwing an error with debug turned on.

    Error on line 72 of file /var/www/html/wp-content/plugins/easy-footnotes/easy-footnotes.php: Undefined offset: 0

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jason Yingling

    (@yingling017)

    Thanks for the heads up. I’ll take a look.

    Plugin Author Jason Yingling

    (@yingling017)

    I’m not having luck recreating the issue, but I think I’ve got an idea for a fix. Any chance you could send me the content of your post so I can check how the footnotes are being called?

    Thread Starter flacoman91

    (@flacoman91)

    hi, here’s example post content for this that is throwing the error on save

    Lorem ipsim lorem lorem [note] test test test.[/note]: aasdfsdfsdaf fsad fdsa fdsa fdsa fadss.[note]Ndsafdasfdsafds6, Statistica, 2016.[/note] It ifasdfdasfsadthly active users,[note]J. Constine, How Facebook Messenger clawed its way to 1 billion users, TechCrunch, 2016.[/note] alrsadfdsafdsafsd

    Plugin Author Jason Yingling

    (@yingling017)

    So you’re getting the error in the WordPress dashboard? Or are you using a theme or plugin that allows you to edit content on the frontend?

    Thread Starter flacoman91

    (@flacoman91)

    I’m just trying to save a post in the standard WordPress dashboard.

    After I hit Publish/Save, it goes to white screen. with the following errors.

    I have WP_DEBUG turned on in wp-config.php

    Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/easy-footnotes/easy-footnotes.php on line 72

    Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/easy-footnotes/easy-footnotes.php on line 72

    Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/easy-footnotes/easy-footnotes.php on line 72

    Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/easy-footnotes/easy-footnotes.php on line 72

    Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/easy-footnotes/easy-footnotes.php on line 72

    Notice: Undefined offset: 0 in /var/www/html/wp-content/plugins/easy-footnotes/easy-footnotes.php on line 72

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/wp-content/plugins/easy-footnotes/easy-footnotes.php:72) in /var/www/html/wp-includes/pluggable.php on line 1216

    Plugin Author Jason Yingling

    (@yingling017)

    Hmm that is odd. I’m not able to recreate the issue on my end. Could you let me know what theme you’re using and if you have any plugins or anything that display the shortcode within the content editor?

    You can try replacing line 72 of easy-footnotes.php with this if ( isset($shortcodes[1][0]) && $content === $shortcodes[1][0] ) {

    But since I’m not able to recreate the issue I haven’t been able to test that yet.

    Would you mind sending me the code that is currently on line 72 of your file as well? There isn’t anything there that should be outputting header information as the warning shows.

    Thread Starter flacoman91

    (@flacoman91)

    ok, thanks for your help.

    I started deactivating all of the plugins on my site.
    I have Yoast SEO installed as well. It seems that when it is enabled the error gets thrown when I save or update a post.

    Deactivating it does not have the error appear.

    Doing a
    var_dump($shortcodes);
    die();
    just shows an empty array.
    array(2) { [0]=> array(0) { } [1]=> array(0) { } }

    line 72 is just
    if ( $content === $shortcodes[1][0] ) {

    Yes, just checking if the value exists fixes the error/warning.

    Thanks.

    Plugin Author Jason Yingling

    (@yingling017)

    Awesome! Thanks for all the info. I usually have Yoast on, but probably didn’t on that test site so I’ll give it a shot with Yoast installed and work on getting an update out soon.

    I appreciate the feedback.

    Any news? Getting this error debug mode on, too :(. Replacing the line surely helps at least in my case.

    Plugin Author Jason Yingling

    (@yingling017)

    This portion of the code has been reworked in version 1.0.16 so you should no longer be getting the error.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘easy-footnotes.php: Undefined offset: 0 error’ is closed to new replies.