Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #42752


Ignore:
Timestamp:
11/29/2017 11:39:42 PM (7 years ago)
Author:
dd32
Comment:

Hi @steffanhalv,

I've updated the description here to have a bit of the information from your woocommerce ticket for ease of searching.

This specific case is because something on your site appears to be defining downloads as a Query Parameter (which can only be strings), also using that parameter in the $_GET variables of a REST API request causes this kind of notice.

It may also cause the REST API request to return different results depending on what the plugin actually does.

I'm fairly certain this is a duplicate of another ticket, which I can't find right now - something about checking for is_scalar() in parse_request().

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #42752 – Description

    initial v1  
     1A PHP Notice can be generated on REST API requests
     2{{{
     3Notice: Array to string conversion in wp-includes/class-wp.php on line 305
     4}}}
     5
     6One Request which can be used to trigger it is this:
     7{{{
     8http://localhost:9001/?_method=PUT&downloads[0][file]=http://localhost:9001/wp-content/uploads/2017/11/1600x1600___112808_1600x1600_v1-26.png&downloads[0][name]=1600x1600___112808_1600x1600_v1-26-png&downloads[1][file]=http://localhost:9001/wp-content/uploads/2017/11/1600x1600___pgs_es_spez_13_top_1600x1600_v1-167.png&downloads[1][name]=1600x1600___pgs_es_spez_13_top_1600x1600_v1-167-png
     9}}}
     10
     11
     12----
     13
     14
    115Please see link for details:
    216