[wp-trac] [WordPress Trac] #49991: PHP Warnings on invalid requests to wp-json/oembed/1.0/embed

WordPress Trac noreply at wordpress.org
Fri Apr 24 03:17:05 UTC 2020


#49991: PHP Warnings on invalid requests to wp-json/oembed/1.0/embed
--------------------------+------------------------------
 Reporter:  dd32          |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Embeds        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  rest-api
--------------------------+------------------------------

Comment (by dd32):

 > PR #236

 For some reason adding `is_string` as the `validate_callback` didn't help.

 It looks like the `type => string` parameter still causes a PHP Notice as
 it's simply run through `strval()` and not actually validated/rejected.

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


More information about the wp-trac mailing list