Fatal Error array count()
-
Hello,
I have an fatal error :
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-content/plugins/smartsearchwp/includes/answers/class-wdgpt-answer-generator.php:852 Stack trace: #0 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-content/plugins/smartsearchwp/includes/answers/class-wdgpt-answer-generator.php(833): WDGPT_Answer_Generator->wdgpt_cosine_similarity() #1 [internal function]: WDGPT_Answer_Generator->{closure}() #2 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-content/plugins/smartsearchwp/includes/answers/class-wdgpt-answer-generator.php(831): array_map() #3 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-content/plugins/smartsearchwp/includes/answers/class-wdgpt-answer-generator.php(867): WDGPT_Answer_Generator->wdgpt_calculate_similarities() #4 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-content/plugins/smartsearchwp/includes/answers/class-wdgpt-answer-generator.php(119): WDGPT_Answer_Generator->wdgpt_sorted_similarities() #5 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-content/plugins/smartsearchwp/includes/wdgpt-api-requests.php(181): WDGPT_Answer_Generator->wdgpt_retrieve_answer_parameters() #6 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/rest-api/class-wp-rest-server.php(1292): wdgpt_retrieve_prompt() #7 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request() #8 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch() #9 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/rest-api.php(449): WP_REST_Server->serve_request() #10 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/class-wp-hook.php(324): rest_api_loaded() #11 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #12 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/plugin.php(565): WP_Hook->do_action() #13 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/class-wp.php(418): do_action_ref_array() #14 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/class-wp.php(813): WP->parse_request() #15 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-includes/functions.php(1336): WP->main() #16 /var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-blog-header.php(16): wp() #17 /var/www/vhosts/scpld.fr/preprod.scpld.fr/index.php(17): require(‘…’) #18 {main} thrown in?/var/www/vhosts/scpld.fr/preprod.scpld.fr/wp-content/plugins/smartsearchwp/includes/answers/class-wdgpt-answer-generator.php?on line?852
Version PHP : 8.2
WP 6.7.2
OpenAI and Licence premium key are active.
Thanks for your help
Nicolas
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.