Uncaught TypeError
-
3.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 318Can you add better data type checks before calling array functions?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Uncaught TypeError’ is closed to new replies.