Title: Php errors
Last modified: April 28, 2020

---

# Php errors

 *  Resolved [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/)
 * 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 [2](https://wordpress.org/support/topic/php-errors-191/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-errors-191/page/2/?output_format=md)

 *  [speedyp](https://wordpress.org/support/users/speedyp/)
 * (@speedyp)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12747048)
 * +1 Us too 🙁
 *  [prunly](https://wordpress.org/support/users/prunly/)
 * (@prunly)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12747266)
 * 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.
 *  [dcarey2](https://wordpress.org/support/users/dcarey2/)
 * (@dcarey2)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12747466)
 * Found that it only has warnings when the box to “Discourage search engines from
   indexing this site” is checked under Settings -> Reading.
 *  [fddlss](https://wordpress.org/support/users/fddlss/)
 * (@fddlss)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12747651)
 * +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.
 *  [shawnslee](https://wordpress.org/support/users/shawnslee/)
 * (@shawnslee)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12747779)
 * The same problem. I just deactivated Yoast and the error message disappeared.
 *  Thread Starter [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12749279)
 * 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](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12749307)
 * [@prunly](https://wordpress.org/support/users/prunly/) Thanks, I give it a day
   to see if they patch it if not I will use your code change.
 *  [prunly](https://wordpress.org/support/users/prunly/)
 * (@prunly)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12751639)
 * [@alriksson](https://wordpress.org/support/users/alriksson/) I can confirm that
   this function has been rewritten to fix this error in Yoast 14.0.2
 *  Thread Starter [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12751742)
 * [@prunly](https://wordpress.org/support/users/prunly/) Saw that, thanks!
 *  [devnihil](https://wordpress.org/support/users/devnihil/)
 * (@devnihil)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12762750)
 * [@prunly](https://wordpress.org/support/users/prunly/) [@alriksson](https://wordpress.org/support/users/alriksson/)
   Thanks for confirming that the update to 14.0.2 corrected the issue for you.
 * [@alriksson](https://wordpress.org/support/users/alriksson/) [@speedyp](https://wordpress.org/support/users/speedyp/)
   [@dcarey2](https://wordpress.org/support/users/dcarey2/) [@fddlss](https://wordpress.org/support/users/fddlss/)
   [@shawnslee](https://wordpress.org/support/users/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/](https://kb.yoast.com/kb/how-can-i-update-my-free-plugin/)
 *  Thread Starter [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12762801)
 * [@devnihil](https://wordpress.org/support/users/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.
 *  [dcarey2](https://wordpress.org/support/users/dcarey2/)
 * (@dcarey2)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12765841)
 * Yes it solved the issue.
    -  This reply was modified 6 years, 1 month ago by [dcarey2](https://wordpress.org/support/users/dcarey2/).
 *  Plugin Support [Maybellyne](https://wordpress.org/support/users/maybellyne/)
 * (@maybellyne)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12789862)
 * [@alriksson](https://wordpress.org/support/users/alriksson/) Does the notice 
   re-appear even after dismissing it?
 *  Thread Starter [Rookie](https://wordpress.org/support/users/alriksson/)
 * (@alriksson)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12789873)
 * [@maybellyne](https://wordpress.org/support/users/maybellyne/) Don’t want to 
   do that as I don’t know if all fields have properly been indexed.
 *  [devnihil](https://wordpress.org/support/users/devnihil/)
 * (@devnihil)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/#post-12790553)
 * [@alriksson](https://wordpress.org/support/users/alriksson/) Can you please try
   the following?:
    -  1. Install & activate the [Yoast Test Helper plugin](https://wordpress.org/plugins/yoast-test-helper/)
      
      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)

1 [2](https://wordpress.org/support/topic/php-errors-191/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-errors-191/page/2/?output_format=md)

The topic ‘Php errors’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [update error](https://wordpress.org/support/topic-tag/update-error/)
 * [Yoast](https://wordpress.org/support/topic-tag/yoast/)

 * 24 replies
 * 11 participants
 * Last reply from: [Rookie](https://wordpress.org/support/users/alriksson/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/php-errors-191/page/2/#post-12809488)
 * Status: resolved