[wp-trac] [WordPress Trac] #42875: /var/www/html/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php on line 328

WordPress Trac noreply at wordpress.org
Tue Dec 12 06:16:14 UTC 2017


#42875: /var/www/html/wp-includes/rest-api/endpoints/class-wp-rest-settings-
controller.php on line 328
--------------------------+------------------------------
 Reporter:  perrywagle    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  4.9.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by dshanske):

 I traced the issue, in discussions with @perrywagle to a plugin using
 register_setting to declare a type of 'array' and noting show_in_rest.

 It says that valid types are  'string', 'boolean', 'integer', and
 'number'. I don't recall seeing this when the feature was first extended.
 Either way, the addition of a function in 4.9 created this error if the
 type is not set to one of the above 4.

 The simple solution is, if it is an unsupported type, it should generate
 an error about that.

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


More information about the wp-trac mailing list