Title: Warning: array_intersect_key(): Expected parameter 1 to be an array,&#8230;..
Last modified: December 9, 2020

---

# Warning: array_intersect_key(): Expected parameter 1 to be an array,…..

 *  Resolved [davide1991](https://wordpress.org/support/users/davide1991/)
 * (@davide1991)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/)
 * Hi there,
 * I am currently receiving the following error:
 * Warning: array_intersect_key(): Expected parameter 1 to be an array, string given
   in /path on line 1402.
 * Thats the line:
 * if ( isset( $callback[‘args’] ) ) {
    $endpoint_data[‘args’] = array();
 *  foreach ( $callback[‘args’] as $key => $opts ) {
    **$arg_data = array_intersect_key(
   $opts, $allowed_schema_keywords );** $arg_data[‘required’] = ! empty( $opts[‘
   required’] );
 *  $endpoint_data[‘args’][ $key ] = $arg_data;
    } }
 * Does someone know how to fix?
 * Br and thanks a lot
    David
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwarning-array_intersect_key-expected-parameter-1-to-be-an-array%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-13767835)
 * Hi [@davide1991](https://wordpress.org/support/users/davide1991/) ,
 * Which file gives that warning?
 * Thanks,
    Savvas
 *  Thread Starter [davide1991](https://wordpress.org/support/users/davide1991/)
 * (@davide1991)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-13767997)
 * Hi Savvas,
 * it is “class-wp-rest-server.php”.
 * Do you need further information?
 * Thanks
    David
 *  Plugin Contributor [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-13768000)
 * Is that a SportsPress file?
 *  Thread Starter [davide1991](https://wordpress.org/support/users/davide1991/)
 * (@davide1991)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-13768055)
 * I think not, as I do not have sportspress installed. THe path is the following:/
   home/www/winegineers.de/wp-includes/rest-api/
 *  Plugin Contributor [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-13768063)
 * This specific thread of WP forums is for SportsPress plugin support 🙂
 * Please open a new topic to the appropriate thread 👍
 * Thanks,
    Savvas
 *  Thread Starter [davide1991](https://wordpress.org/support/users/davide1991/)
 * (@davide1991)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-13769373)
 * Oh Sorry – thanks Savvas. Do you know where I can open this topic?
 *  Plugin Contributor [Savvas](https://wordpress.org/support/users/savvasha/)
 * (@savvasha)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-13769726)
 * Probably here: [https://wordpress.org/support/forum/how-to-and-troubleshooting/](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 *  [eeats](https://wordpress.org/support/users/eeats/)
 * (@eeats)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-14178569)
 * Hi [@davide1991](https://wordpress.org/support/users/davide1991/),
 * Did you get this resolved? I am currently dealing with the same issue and have
   no idea on how to fix it.
 *  [Roch](https://wordpress.org/support/users/rochesterj/)
 * (@rochesterj)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-14187262)
 * Hi there!
 * If you have the exact same error on the exact same file, it’s likely that this
   belongs on the WP forums as well:
    [https://wordpress.org/support/forum/how-to-and-troubleshooting/](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * Thanks!

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

The topic ‘Warning: array_intersect_key(): Expected parameter 1 to be an array,…..’
is closed to new replies.

 * ![](https://ps.w.org/sportspress/assets/icon-256x256.png?rev=1252005)
 * [SportsPress - Sports Club & League Manager](https://wordpress.org/plugins/sportspress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sportspress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sportspress/)
 * [Active Topics](https://wordpress.org/support/plugin/sportspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sportspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sportspress/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [Roch](https://wordpress.org/support/users/rochesterj/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/warning-array_intersect_key-expected-parameter-1-to-be-an-array/#post-14187262)
 * Status: resolved