Bug et repository du code
-
[02-Apr-2024 11:23:20 UTC] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /bitnami/wordpress/wp-content/plugins/hal/wp-hal.php:1176 Stack trace: #0 /opt/bitnami/wordpress/wp-includes/widgets.php(1261): wphal_widget->widget() #1 /opt/bitnami/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php(553): the_widget() #2 /opt/bitnami/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php(522): WP_REST_Widget_Types_Controller->get_widget_preview() #3 /opt/bitnami/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1193): WP_REST_Widget_Types_Controller->encode_form_data() #4 /opt/bitnami/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1041): WP_REST_Server->respond_to_request() #5 /opt/bitnami/wordpress/wp-includes/rest-api/class-wp-rest-server.php(431): WP_REST_Server->dispatch() #6 /opt/bitnami/wordpress/wp-includes/rest-api.php(424): WP_REST_Server->serve_request() #7 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(324): rest_api_loaded() #8 /opt/bitnami/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #9 /opt/bitnami/wordpress/wp-includes/plugin.php(565): WP_Hook->do_action() #10 /opt/bitnami/wordpress/wp-includes/class-wp.php(418): do_action_ref_array() #11 /opt/bitnami/wordpress/wp-includes/class-wp.php(813): WP->parse_request() #12 /opt/bitnami/wordpress/wp-includes/functions.php(1336): WP->main() #13 /opt/bitnami/wordpress/wp-blog-header.php(16): wp() #14 /opt/bitnami/wordpress/index.php(17): require('...') #15 {main} thrown in /bitnami/wordpress/wp-content/plugins/hal/wp-hal.php on line 1176
Peut-on remplacer le code ligne 1176
$count_results = count($json->response->docs);
par celui-ci ?
$count_results = !is_null($json->response->docs) ? count($json->response->docs) : 0;
Ou se trouve le repository du code du plugin ?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.