Uncaught Error in widgets.php
-
Hello,
On our site, there were several of our product categories where only have of the page was rendered. Looking at the error logs, it appeared to come from the get_attribute_values (line 409) function. Some of the times when it was called, a WP_Error object would be returned from the get_terms() (line 423) functions however there was no check in place for this, causing a fatal error to happen when the object was passed as an argument to the function wp_list_pluck method (line 462). On our site we resolved this by adding the following check on line 424:
if(is_a($re, 'WP_Error')) return array();
I made the post so that a better fix might be found and added to the plugin itself.
WordPress Version: 4.7.5
AJAX Product Filter Version: 1.1.8.1
WooCommerce Version: 3.0.7
- The topic ‘Uncaught Error in widgets.php’ is closed to new replies.