Skip to content

Commit 0566d56

Browse files
committed
Fixed issue where filtering rows did not work as expected.
1 parent ebb8f29 commit 0566d56

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

class-object-type-google-sheet.php

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -320,22 +320,18 @@ public function perform_search( $var, $search ) {
320320
*/
321321
public function search( $var, $search_params ) {
322322
foreach ( $search_params as $search_group ) {
323-
$matches_group = true;
323+
if ( is_array( $search_group ) ) {
324+
foreach ( $search_group as $search ) {
325+
$matches_group = $this->perform_search( $var, $search );
324326

325-
foreach ( $search_group as $search ) {
326-
$matches_group = $this->perform_search( $var, $search );
327-
328-
if ( ! $matches_group ) {
329-
break;
327+
if ( ! $matches_group ) {
328+
return false;
329+
}
330330
}
331331
}
332-
333-
if ( $matches_group ) {
334-
return true;
335-
}
336332
}
337333

338-
return false;
334+
return true;
339335
}
340336

341337
public function query( $args ) {

0 commit comments

Comments
 (0)