Conversation
support3.1.6 is throwing the following fatal on a site: PHP Fatal error: Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, false given in /srv/htdocs/wp-content/plugins/woolentor-addons/includes/helper-function.php:318 Stack trace: #0 /srv/htdocs/wp-content/plugins/woolentor-addons/includes/helper-function.php(318): array_search(1531, false) #1 /srv/htdocs/wp-content/plugins/woolentor-addons/includes/base.php(411): woolentor_set_views_count(1531, 'product') #2 /wordpress/core/6.8.2/wp-includes/class-wp-hook.php(324): WooLentor\Base->track_user_viewed_products('') #3 /wordpress/core/6.8.2/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 /wordpress/core/6.8.2/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /wordpress/core/6.8.2/wp-includes/template-loader.php(13): do_action('template_redire...') #6 /wordpress/core/6.8.2/wp-blog-header.php(19): require_once('/wordpress/core...') #7 /wordpress/core/6.8.2/index.php(17): require('/wordpress/core...') #8 {main} thrown in /srv/htdocs/wp-content/plugins/woolentor-addons/includes/helper-function.php on line 318 Can you add better data type checks before calling array functions?
Hello @mtg169 , Thank you for bringing this to our attention, and we’re very sorry for the inconvenience caused. We’ve reviewed the error you’ve reported, and it appears to be due to a missing data type check before calling the array_search() function. We appreciate you pointing this out. Our development team is already looking into it, and we’ll include a fix with proper data validation in the next plugin update as soon as possible. Thank you again for your detailed report—it really helps us improve the plugin. If you have any further questions or need temporary assistance, feel free to let us know. Best regards, Kamal
Hi @mtg169 , We’ve just released new version 3.1.7, which addresses the issue you encountered. Feel free to update to the latest version, and do let us know if you face any further trouble. We appreciate your patience throughout this process. Kind regards, Zenaul Islam
Hello @mtg169 , Thank you for bringing this to our attention, and we’re very sorry for the inconvenience caused. We’ve reviewed the error you’ve reported, and it appears to be due to a missing data type check before calling the array_search() function. We appreciate you pointing this out. Our development team is already looking into it, and we’ll include a fix with proper data validation in the next plugin update as soon as possible. Thank you again for your detailed report—it really helps us improve the plugin. If you have any further questions or need temporary assistance, feel free to let us know. Best regards, Kamal
Hi @mtg169 , We’ve just released new version 3.1.7, which addresses the issue you encountered. Feel free to update to the latest version, and do let us know if you face any further trouble. We appreciate your patience throughout this process. Kind regards, Zenaul Islam