[wp-trac] [WordPress Trac] #54043: PHP Fatal Error on the rest api location

WordPress Trac noreply at wordpress.org
Tue Aug 31 18:27:01 UTC 2021


#54043: PHP Fatal Error on the rest api location
--------------------------+------------------------------
 Reporter:  passam        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by sabernhardt):

 * component:  General => REST API


Old description:

> Here's is the full stack trace. Note, we do not alter core files in any
> way and it is updated to the latest version (5.8 at time of writing)...
> Note we recently upgraded to php8
>
> timberry.bplans.com - PHP Fatal error: Uncaught ArgumentCountError:
> is_numeric() expects exactly 1 argument, 3 given in
> /home/sauron/code/global/wp/www/wp/wp-includes/rest-api/class-wp-rest-
> request.php:910
> Stack trace:
> #0 /home/sauron/code/global/wp/www/wp/wp-includes/rest-api/class-wp-rest-
> request.php(910): is_numeric('14102', Object(WP_REST_Request), 'id')
> #1 /home/sauron/code/global/wp/www/wp/wp-includes/rest-api/class-wp-rest-
> server.php(976): WP_REST_Request->has_valid_params()
> #2 /home/sauron/code/global/wp/www/wp/wp-includes/rest-api/class-wp-rest-
> server.php(414): WP_REST_Server->dispatch(Object(WP_REST_Request))
> #3 /home/sauron/code/global/wp/www/wp/wp-includes/rest-api.php(370):
> WP_REST_Server->serve_request('/custom-permali...')
> #4 /home/sauron/code/global/wp/www/wp/wp-includes/class-wp-hook.php(303):
> rest_api_loaded(Object(WP))
> #5 /home/sauron/code/global/wp/www/wp/wp-includes/class-wp-hook.php(327):
> WP_Hook->apply_filters('', Array)
> #6 /home/sauron/code/global/wp/www/wp/wp-includes/plugin.php(518):
> WP_Hook->do_action(Array)
> #7 /home/sauron/code/global/wp/www/wp/wp-includes/class-wp.php(388):
> do_action_ref_array('parse_request', Array)
> #8 /home/sauron/code/global/wp/www/wp/wp-includes/class-wp.php(750):
> WP->parse_request('')
> #9 /home/sauron/code/global/wp/www/wp/wp-includes/functions.php(1291):
> WP->main('')
> #10 /home/sauron/code/global/wp/www/wp/wp-blog-header.php(16): wp()
> #11 /home/sauron/code/global/wp/www/index.php(9):
> require('/home/sauron/co...')
> #12 {main}
>  thrown in /home/sauron/code/global/wp/www/wp/wp-includes/rest-api/class-
> wp-rest-request.php on line 910

New description:

 Here's is the full stack trace. Note, we do not alter core files in any
 way and it is updated to the latest version (5.8 at time of writing)...
 Note we recently upgraded to php8

 {{{
 timberry.bplans.com - PHP Fatal error: Uncaught ArgumentCountError:
 is_numeric() expects exactly 1 argument, 3 given in .../www/wp/wp-includes
 /rest-api/class-wp-rest-request.php:910
 Stack trace:
 #0 .../www/wp/wp-includes/rest-api/class-wp-rest-request.php(910):
 is_numeric('14102', Object(WP_REST_Request), 'id')
 #1 .../www/wp/wp-includes/rest-api/class-wp-rest-server.php(976):
 WP_REST_Request->has_valid_params()
 #2 .../www/wp/wp-includes/rest-api/class-wp-rest-server.php(414):
 WP_REST_Server->dispatch(Object(WP_REST_Request))
 #3 .../www/wp/wp-includes/rest-api.php(370): WP_REST_Server->serve_request
 ('/custom-permali...')
 #4 .../www/wp/wp-includes/class-wp-hook.php(303):
 rest_api_loaded(Object(WP))
 #5 .../www/wp/wp-includes/class-wp-hook.php(327):
 WP_Hook->apply_filters('', Array)
 #6 .../www/wp/wp-includes/plugin.php(518): WP_Hook->do_action(Array)
 #7 .../www/wp/wp-includes/class-wp.php(388):
 do_action_ref_array('parse_request', Array)
 #8 .../www/wp/wp-includes/class-wp.php(750): WP->parse_request('')
 #9 .../www/wp/wp-includes/functions.php(1291): WP->main('')
 #10 .../www/wp/wp-blog-header.php(16): wp()
 #11 .../www/index.php(9): require('/home/saur...')
 #12 {main}
  thrown in .../www/wp/wp-includes/rest-api/class-wp-rest-request.php on
 line 910
 }}}

--

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


More information about the wp-trac mailing list