Fatal error on page edit
-
Hi Prakhar,
Fatal error: Uncaught Error: Call to a member function get_data() on array in /path-to-my-wp/wp-content/plugins/hungry-rest-api-monitor/includes/trackers/class-rest-tracker.php:236there is:
/**
* Get response body size.
*
* @param WP_REST_Response|WP_Error $response Response object.
* @return int Size in bytes.
*/
private static function get_response_size($response)
{
if (is_wp_error($response)) {
return 0;
}
$data = $response->get_data();
return strlen(wp_json_encode($data));
}and as it seems the class ‘WP_REST_Response’ really do not has that method get_data()
https://developer.ww.wp.xz.cn/reference/classes/wp_rest_response/#methods
—-
BTW as you marked your plugin as licence “GPLv2 or later”.so it is meant to be open source.
Is there a public repo where one could join in and suggest contributions?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.