[wp-trac] [WordPress Trac] #37570: Parameter 1 to wp_handle_upload_error() expected to be a reference, value given
WordPress Trac
noreply at wordpress.org
Tue Aug 9 12:48:52 UTC 2016
#37570: Parameter 1 to wp_handle_upload_error() expected to be a reference, value
given
-------------------------------------+--------------------
Reporter: jbrinley | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.6
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+--------------------
Changes (by ocean90):
* milestone: Awaiting Review => 4.6
Comment:
We should consider to fix this in 4.6.
The issue is not only the warning, it also prevents the execution of the
function, which means that the upload gets treated as successful.
Let's say the `$test_uploaded_file` condition fails:
Expected:
{{{#!json
{
"success": false,
"data": {
"message": "Specified file failed upload test.",
"filename": "test.png"
}
}
}}}
Actual:
{{{#!json
{
"success": true,
"data": {
"id": 32,
"title": "test",
"filename": "",
"url": "http:\/\/src.wordpress-develop.dev\/test\/",
"link": "http:\/\/src.wordpress-develop.dev\/test\/",
"alt": "",
"author": "1",
"description": "",
"caption": "",
"name": "test",
"status": "inherit",
"uploadedTo": 0,
"date": 1470746608000,
"modified": 1470746608000,
"menuOrder": 0,
"mime": "",
"type": "",
"subtype": "",
"icon": "http:\/\/src.wordpress-develop.dev\/wp-
includes\/images\/media\/default.png",
"dateFormatted": "9. August 2016",
"nonces": {
"update": "b8499d3bd9",
"delete": "19e4752d90",
"edit": "975849a990"
},
"editLink": "http:\/\/src.wordpress-develop.dev\/wp-
admin\/post.php?post=32&action=edit",
"meta": false,
"authorName": "admin",
"compat": {
"item": "",
"meta": ""
}
}
}
}}}
@dd32, @pento, @jorbin: What do you think?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37570#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list