• Resolved andreaferracani

    (@andreaferracani)


    Hi,
    I get these warnings on every page load with the Mission News theme:

    PHP Warning:  Undefined array key "source" in /wp-content/themes/mission-news/logo.php on line 9
    PHP Warning:  Undefined array key "source" in /wp-content/themes/mission-news/logo.php on line 14
    PHP Warning:  Undefined array key "source" in /wp-content/themes/mission-news/logo.php on line 16

    WordPress (latest version), PHP 8.1.
    Looks like the code tries to access ['source'] without checking if it exists. I suggest to fix this. Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hi there,

    Thanks for using Mission News!

    This can happen if you are using a child theme created with an older version of Mission News. If you have the header.php or footer.php file in the child theme, look for this line:

    get_template_part( 'logo' );

    And add the location it’s coming from, like this:

    get_template_part( 'logo', '', array('source' => 'header') );

    That will resolve the error messages and also ensure the logo is displayed properly.

    Thread Starter andreaferracani

    (@andreaferracani)

    Hi Ben,
    thanks a lot for the tip! Looks like the issue was on my side after all 🙈 I really appreciate your help and the clear guidance.

    All the best

    Theme Author Ben Sibley

    (@bensibley)

    No worries! I’m glad I could help.

    Stay in touch if you need anything else.

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

The topic ‘php warning’ is closed to new replies.