Title: Warning: array_key_exists() expects parameter 2 to be array
Last modified: February 10, 2021

---

# Warning: array_key_exists() expects parameter 2 to be array

 *  Resolved [sergo2003](https://wordpress.org/support/users/sergo2003/)
 * (@sergo2003)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/)
 * Good afternoon, please tell me how to fix this warning, which is displayed on
   the site. If I disable the Yoast SEO plugin, then this error also disappears.
 * Warning: array_key_exists() expects parameter 2 to be array, string given in /
   home/users/***/wp-content/plugins/wordpress-seo/src/generators/schema/breadcrumb.
   php on line 147
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-array_key_exists-expects-parameter-2-to-be-array-8%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Suwash Kunwar](https://wordpress.org/support/users/suascat_wp/)
 * (@suascat_wp)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14029427)
 * [@sergo2003](https://wordpress.org/support/users/sergo2003/)
 * We’re sorry that you’re getting an error caused by our plugin.
 * Just to be sure, we would like to rule out any plugin or theme conflicts that
   may occur. The fastest way to do this is to **deactivate all non-Yoast plugins
   and switch to a standard theme** like [Twenty Nineteen](https://wordpress.org/themes/twentynineteen/).
 * Test this on your development or staging site, if you have one. If not, we recommend
   using the [Health Check & Troubleshooting](https://wordpress.org/plugins/health-check/)
   plugin. This plugin allows you to run a conflict check **without affecting normal
   visitors to your site**.
 * As we can imagine that you’re unfamiliar with checking for conflicts, we’d like
   to point you to a step-by-step guide that will walk you through the process: 
   [How to check for plugin conflicts](https://kb.yoast.com/kb/how-to-check-for-plugin-conflicts/).
 *  Thread Starter [sergo2003](https://wordpress.org/support/users/sergo2003/)
 * (@sergo2003)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14029465)
 * I have already disabled all plugins, the error is still displayed. It appeared
   after updating the plugin.
    is discussing the same issue here, can this help?
   [https://github.com/Yoast/wordpress-seo/issues/15800](https://github.com/Yoast/wordpress-seo/issues/15800)
 *  [Suwash Kunwar](https://wordpress.org/support/users/suascat_wp/)
 * (@suascat_wp)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14029647)
 * We just pushed a new update Yoast SEO [v15.8](https://wordpress.org/plugins/wordpress-seo/#developers).
   Would you please update and see if this resolves the issue?
 * If this doesn’t work or you have more questions, just let us know and we’ll take
   a further look.
 *  Thread Starter [sergo2003](https://wordpress.org/support/users/sergo2003/)
 * (@sergo2003)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14029917)
 * The error remains, but now it gives this error
    Warning: array_key_exists() expects
   parameter 2 to be array, string given in /home/users***/plugins/wordpress-seo/
   src/generators/schema/breadcrumb.php on line 143
 * The error remained, but now it throws this error. Refers to the same line in 
   the code
    return ! \array_key_exists( ‘url’, $breadcrumb ) || ! \array_key_exists(‘
   text’, $breadcrumb );
 *  [Rumejan](https://wordpress.org/support/users/onlyincebu/)
 * (@onlyincebu)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14030433)
 * Hello!
 * Thanks for getting back to us.
 * We’ve seen a similar issue in the past, and a conflict with another plugin caused
   it. Just to verify, does the issue occur if you only have Yoast SEO activated
   with ALL other plugins deactivated and your theme switched to a standard theme
   like Twenty-Twenty? If no issue occurs, reactivate your other plugins one at 
   a time and see if the issue occurs again for every plugin reactivated. Lastly,
   switch to your theme.
 * Test this on your development site or use the [Health Check & Troubleshooting](https://wordpress.org/plugins/health-check/)
   plugin.
 *  Thread Starter [sergo2003](https://wordpress.org/support/users/sergo2003/)
 * (@sergo2003)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14030519)
 * Once again I turned off the rest of the plugins, but unfortunately this did not
   help …
 *  [devnihil](https://wordpress.org/support/users/devnihil/)
 * (@devnihil)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14031839)
 * [@sergo2003](https://wordpress.org/support/users/sergo2003/) Thanks for your 
   reply. Did you also try resetting the site to a default theme such as [TwentyTwenty](https://wordpress.org/themes/twentytwenty/),
   in addition to disabling other plugins?
 * Also, if you clear your site’s cache (server, plugin/theme, or CDN such as Cloudflare)
   does this resolve the error? If you are not sure how to clear your server cache
   you should speak with your host provider.
 *  Thread Starter [sergo2003](https://wordpress.org/support/users/sergo2003/)
 * (@sergo2003)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14034206)
 * Thanks for the help. The site has a native theme twenty fifteen. I don’t use 
   CloudFlare. Cash dropped, although it is unlikely that he can affect this warning.
   Please look at the error itself, I think you need to “dig” in the other direction…
   
   I had to turn off the Yoast SEO plugin to fix the error.
 *  [Suwash Kunwar](https://wordpress.org/support/users/suascat_wp/)
 * (@suascat_wp)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14034390)
 * [@sergo2003](https://wordpress.org/support/users/sergo2003/) We tested the Twentyfifteen
   standard theme and Yoast SEO v15.8 on local test environment but unable to replicate
   the error. We need some additional information about your setup. Can you confirm
   that your server meets the [minimum plugin requirements](https://yoast.com/help/plugin-requirements/)?
   You can often find these details by going to Tools > Site Health > Info in WordPress.
 * We look forward to your response.
 *  [djennez](https://wordpress.org/support/users/djennez/)
 * (@djennez)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14034566)
 * [@sergo2003](https://wordpress.org/support/users/sergo2003/) thanks for the headsup.
   I have written a fix for the warning. However, something is breaking schema breadcrumbs
   in your site. The fix will only remove the warning, but schema breadcrumbs will
   still fail to be generated. So it would be good to know which plugin or custom
   code is messing this up.
 * There is a chance that you can fix this by running the “Reset migrations and 
   indexables” button from our Yoast Test helper plugin.
 *  Thread Starter [sergo2003](https://wordpress.org/support/users/sergo2003/)
 * (@sergo2003)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14036509)
 * I checked the requirements, everything turned out to be normal. I tried to install
   the PHP version from 7.1 to 7.4. Nothing changed. I tried to open it in browsers:
   Chrome, Mozilla, IE, Yandex. The error is present in all.
    If you enable the 
   Yoast SEO plugin and open the Site Health section, then the warning is very confusing:
 * The REST API is one way WordPress, and other applications, communicate with the
   server. One example is the block editor screen, which relies on this to display,
   and save, your posts and pages.
    The REST API did not process the context query
   parameter correctly.
 * I think this is the problem. And if I turn off the Yoast SEO plugin, then this
   warning also disappears.
 * Dear [@djennez](https://wordpress.org/support/users/djennez/), where can I download
   your fix?
 *  [djennez](https://wordpress.org/support/users/djennez/)
 * (@djennez)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14036582)
 * My fix was implemented in the 15.9 release candidate of the plugin. So it should
   be live in the next release.
 *  Thread Starter [sergo2003](https://wordpress.org/support/users/sergo2003/)
 * (@sergo2003)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14036648)
 * Thanks [@djennez](https://wordpress.org/support/users/djennez/), then I’ll wait
   for the update

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

The topic ‘Warning: array_key_exists() expects parameter 2 to be array’ 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

 * [array_key_exists](https://wordpress.org/support/topic-tag/array_key_exists/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 13 replies
 * 5 participants
 * Last reply from: [sergo2003](https://wordpress.org/support/users/sergo2003/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/warning-array_key_exists-expects-parameter-2-to-be-array-8/#post-14036648)
 * Status: resolved