[wp-trac] [WordPress Trac] #63502: HTTP 500 in `wp-json/batch` with specific arguments
WordPress Trac
noreply at wordpress.org
Thu May 29 20:28:02 UTC 2025
#63502: HTTP 500 in `wp-json/batch` with specific arguments
--------------------------+-----------------------------
Reporter: bor0 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.8
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Hitting the endpoint `/wp-json/batch/v1` with specific arguments can
result in 500.
To reproduce, use this script:
{{{
#!/bin/bash
curl -X POST http://localhost:8080/wp-json/batch/v1 \
-H "Content-Type: application/json" \
-u bor0:asdf \
-d '{
"requests": [
{
"method": "POST",
"path": "http://user@:80"
}
]
}'
}}}
Results in `[Mon Jan 27 12:23:43.157697 2025] [php:error] [pid 27451]
[client ::1:61293] PHP Fatal error: Uncaught Error: Call to undefined
method WP_Error::get_method() in /opt/homebrew/var/www/wp-includes/rest-
api/class-wp-rest-server.php:1153`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63502>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list