Skip to content

Commit d444222

Browse files
committed
Fixed PHP error that could occur if using both filtering and ordering.
1 parent 7d0cf28 commit d444222

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

class-object-type-google-sheet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,9 @@ public function query( $args ) {
355355
$search_params = $this->process_filter_groups( $args );
356356

357357
if ( ! empty( $search_params ) ) {
358-
$results = array_filter( $results, function ( $var ) use ( $search_params ) {
358+
$results = array_values( array_filter( $results, function ( $var ) use ( $search_params ) {
359359
return $this->search( $var, $search_params );
360-
} );
360+
} ) );
361361
}
362362

363363
$orderby = rgar( $ordering, 'orderby' );

0 commit comments

Comments
 (0)