[wp-trac] [WordPress Trac] #51986: PHP Warning: array_intersect_key(): Expected parameter 1 to be an array, string given in class-wp-rest-server.php

WordPress Trac noreply at wordpress.org
Wed Dec 9 15:03:24 UTC 2020


#51986: PHP Warning: array_intersect_key(): Expected parameter 1 to be an array,
string given in class-wp-rest-server.php
---------------------------------------------+-----------------------------
 Reporter:  slaFFik                          |       Owner:  (none)
     Type:  defect (bug)                     |      Status:  new
 Priority:  normal                           |   Milestone:  Awaiting
                                             |  Review
Component:  Editor                           |     Version:  5.6
 Severity:  normal                           |  Resolution:
 Keywords:  reporter-feedback needs-testing  |     Focuses:  rest-api
---------------------------------------------+-----------------------------
Changes (by desrosj):

 * keywords:  reporter-feedback => reporter-feedback needs-testing


Comment:

 @apermo thanks for those details! I am also able to reproduce with the
 `redux-framework` plugin and looking into the issue some more.

 @slaFFik I don't disagree, but it's important to understand what the
 patterns are causing the issue and confirm that type casting will not
 cause unintended consequences or backwards compatibility concerns before
 deciding on the correct change.

 Are you able to share which plugin is causing the issue for you? If it's a
 custom plugin not available on the wordpress.org/plugin directory,
 dropping the offending code would be very helpful.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51986#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list