WordPress.org

Make WordPress Core

Ticket #12891: 12891-better_get_tax_sql_error_handling.patch

File 12891-better_get_tax_sql_error_handling.patch, 448 bytes (added by Viper007Bond, 3 years ago)
  • wp-includes/taxonomy.php

     
    586586 
    587587                $sql_single = get_objects_in_term( $query['terms'], $query['taxonomy'], $query ); 
    588588 
    589                 if ( empty( $sql_single ) ) 
     589                if ( empty( $sql_single ) || is_wp_error( $sql_single ) ) 
    590590                        return ' AND 0 = 1'; 
    591591 
    592592                $sql[] = $sql_single;