• Resolved Rookie

    (@alriksson)


    Warning: in_array() expects parameter 2 to be array, null given in /Users/user-name/Local Sites/website-example/app/public/wp-content/plugins/wordpress-seo/src/helpers/robots-helper.php on line 27

    Appeared after the latest 14.0.1 update.

Viewing 15 replies - 1 through 15 (of 24 total)
  • +1 Us too ??

    Same. To fix the error I’ve edited line 27 in the file robots-helper.php so that it checks for a valid array before trying to look in it.

    So line 27:
    if ( in_array( 'noindex', $presentation->robots, true ) ) {

    Is changed to:
    if ( is_array($presentation->robots) && in_array( 'noindex', $presentation->robots, true ) ) {

    Not sure what other ramifications this might have. I’m sure it will be addressed by the Yoast team quickly. In any case you can always roll back to an earlier version.

    Found that it only has warnings when the box to “Discourage search engines from indexing this site” is checked under Settings -> Reading.

    +1 It gives you the above error when “Discourage search engines from indexing this site” is checked under Settings -> Reading. However, I have 3 website where that option is NOT checked and I’m getting:

    There has been a critical error on your website. Please check your site admin email inbox for instructions.

    Learn more about debugging in WordPress.

    Removing and reinstalling the plugin doesn’t help.

    The same problem. I just deactivated Yoast and the error message disappeared.

    Thread Starter Rookie

    (@alriksson)

    Have not updated on any production site, as a general rule wait for 1-2-3 patches to not run into problems like this on production. Never update to a main update. Will always include a lot of bugs. but local and staging have “Discourage search engines from indexing this site”.

    I hope to see another patch today to fix all the new bugs that appeared.

    Thread Starter Rookie

    (@alriksson)

    @prunly Thanks, I give it a day to see if they patch it if not I will use your code change.

    @alriksson I can confirm that this function has been rewritten to fix this error in Yoast 14.0.2

    Thread Starter Rookie

    (@alriksson)

    @prunly Saw that, thanks!

    Plugin Support devnihil

    (@devnihil)

    @prunly @alriksson Thanks for confirming that the update to 14.0.2 corrected the issue for you.

    @alriksson @speedyp @dcarey2 @fddlss @shawnslee If you update to the most current version of Yoast SEO version 14.0.4, does this resolve the issue? You can learn more about updating here: https://kb.yoast.com/kb/how-can-i-update-my-free-plugin/

    Thread Starter Rookie

    (@alriksson)

    @devnihil It solved this issue but I still have other applications that can not even index or on some I still see the update box even if it successfully indexed.

    Yes it solved the issue.

    • This reply was modified 4 years, 7 months ago by dcarey2.
    Plugin Support Maybellyne

    (@maybellyne)

    @alriksson Does the notice re-appear even after dismissing it?

    Thread Starter Rookie

    (@alriksson)

    @maybellyne Don’t want to do that as I don’t know if all fields have properly been indexed.

    Plugin Support devnihil

    (@devnihil)

    @alriksson Can you please try the following?:

      1. Install & activate the?Yoast Test Helper plugin
      2. Go to Tools -> Yoast Test
      3. Hit the “Reset indexables & migrations” button
      4. Delete your current Yoast SEO installation.
      5. Update to Yoast SEO 14.0.4.
      6. Click the “Click here to speed up your site now” button.
Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Php errors’ is closed to new replies.