Fatal Rest errors in WP logs
This is for a WP 5.9 site running CiviCRM 5.51.0
I have been seeing this fatal error in the WP logs from time to time, but haven't personally run into it to know what triggered it:
PHP Fatal error: Uncaught TypeError: array_reduce(): Argument #1 ($array) must be of type array, int given in /home/www/wp-content/plugins/civicrm/wp-rest/Controller/Rest.php:156
Stack trace:
#0 /home/www/wp-content/plugins/civicrm/wp-rest/Controller/Rest.php(156): array_reduce(1, Object(Closure), Array)
#1 /home/www/wp-includes/rest-api/class-wp-rest-server.php(1141): CiviCRM_WP_REST\Controller\Rest->get_items(Object(WP_REST_Request))
#2 /home/www/wp-includes/rest-api/class-wp-rest-server.php(988): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/civicrm/v3/res...', Array, NULL)
#3 /home/www/wp-includes/rest-api/class-wp-rest-server.php(414): WP_REST_Server->dispatch(Object(WP_REST_Request))
#4 /home/www/wp-includes/rest-api.php(386): WP_REST_Server->serve_request('/civicrm/v3/res...')
#5 /home/www/wp-includes/class-wp-hook.php(307): rest_api_loaded(Object(WP))
#6 /home/www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
#7 /home/www/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#8 /home/www/wp-includes/class-wp.php(396): do_action_ref_array('parse_request', Array)
#9 /home/www/wp-includes/class-wp.php(758): WP->parse_request('')
#10 /home/www/wp-includes/functions.php(1310): WP->main('')
#11 /home/www/wp-blog-header.php(16): wp()
#12 /home/www/index.php(17): require('/home/www...')
#13 {main}
thrown in /home/www/wp-content/plugins/civicrm/wp-rest/Controller/Rest.php on line 156
I tried to check the Civi logs to see if I could find a match, but think the fatal error trumped it enough that Civi couldn't log it.