Support » Plugin: Automatic Featured Images from Videos » Undefined variables

  • Hi,

    My error logs are being spammed by these notices:

    [18-Dec-2019 12:39:20 UTC] PHP Notice:  Undefined variable: youtube_details in /home/macmagazine/public_html/wp-content/plugins/automatic-featured-images-from-videos/automatic-featured-images-from-videos.php on line 137
    [18-Dec-2019 12:39:20 UTC] PHP Notice:  Undefined variable: vimeo_details in /home/macmagazine/public_html/wp-content/plugins/automatic-featured-images-from-videos/automatic-featured-images-from-videos.php on line 137

    Can you help me get rid of them?

    It seems similar or the same as this one: https://wordpress.org/support/topic/undefined-variable-error-broke-whole-site/

    Cheers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Same question as I asked them, though it looks like I unintentionally missed followup for them.

    How comfy are you with editing code?

    Thinking that you could do something like the following around line 119 of the file in question.

    $youtube_details = '';
    $vimeo_details = '';
    

    that way they’re at least defined, though still empty until maybe defined shortly after.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Thread Starter Rafael Fischmann

    (@rfischmann)

    I’m totally fine doing that, @tw2113. Just applied it to the file and will keep my eyes on the logs.

    Cheers!

    Thread Starter Rafael Fischmann

    (@rfischmann)

    Hum, the notices have changed:

    [19-Dec-2019 16:40:57 UTC] PHP Notice:  Undefined index: video_thumbnail_url in /home/macmagazine/public_html/wp-content/plugins/automatic-featured-images-from-videos/automatic-featured-images-from-videos.php on line 124
    [19-Dec-2019 16:40:57 UTC] PHP Notice:  Undefined index: video_url in /home/macmagazine/public_html/wp-content/plugins/automatic-featured-images-from-videos/automatic-featured-images-from-videos.php on line 125
    [19-Dec-2019 16:40:57 UTC] PHP Notice:  Undefined index: video_embed_url in /home/macmagazine/public_html/wp-content/plugins/automatic-featured-images-from-videos/automatic-featured-images-from-videos.php on line 126
    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Much of the same type of fix should address those as well, though we’ll definitely want to make those permanent fixes too on our end.

    Thread Starter Rafael Fischmann

    (@rfischmann)

    No worries, I’ll wait for an update! Cheers.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Undefined variables’ is closed to new replies.