[wp-trac] [WordPress Trac] #48785: REST API: WP_REST_Controller::get_public_item_schema() assumes that the schema has properties.

WordPress Trac noreply at wordpress.org
Mon Apr 20 22:20:38 UTC 2020


#48785: REST API: WP_REST_Controller::get_public_item_schema() assumes that the
schema has properties.
-------------------------------------------------+-------------------------
 Reporter:  pento                                |       Owner:
                                                 |  TimothyBlynJacobs
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.4
Component:  REST API                             |     Version:  4.7
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:
  tests commit                                   |
-------------------------------------------------+-------------------------

Comment (by ajaaskel):

 Would you please explain a little bit more. It's nice to hear "it's fixed"
 but it's not obvious for a system maintainer how to fix the thing.
 Where/how the fix is available?
 I faced the problem when running search/replace at WP client software (a
 special tool for maintaining WordPress on command line). The purpose is to
 change the complete setup to a new domain. The tool does not change
 anything but gives up at that error.
 A sample:

 from_domain=domain1.com
 to_domain=domain2.com

 wp --path=/home/www/domain/"$our_domain"/html search-replace
 "$from_domain" "$our_domain"

 PHP Warning:  Invalid argument supplied for foreach() in
 /home/www/domain/domain2.com/html/wp-includes/rest-api/endpoints/class-wp-
 rest-controller.php on line 287
 Warning: Invalid argument supplied for foreach() in
 /home/www/domain/domain2.com/html/wp-includes/rest-api/endpoints/class-wp-
 rest-controller.php on line 287

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


More information about the wp-trac mailing list