Error with query
-
In PHP 8.3 if you call
$query->set( 'tax_query', array( array( 'taxonomy' => 'product_cat', 'operator' => 'EXISTS', ) ) );
Undefined array key 0+
anything-order-by-terms/modules/base/class.php:298Undefined property: WP_Error::$slug+
app/plugins/anything-order-by-terms/modules/base/class.php:300Solution is add check in modules/base/class.php before
if ( ‘term_id’ === $tax_query[‘field’] ) {if ( !isset( $tax_query['terms'][0] ) ) return ''; if ( 'term_id' === $tax_query['field'] ) {
- The topic ‘Error with query’ is closed to new replies.