From b6b0b024d071122768617c454f8ada750f2f6284 Mon Sep 17 00:00:00 2001 From: Gregor Date: Wed, 5 Apr 2023 10:35:28 +0200 Subject: [PATCH] fix code for PHP 7.4 #1 --- Controller/Component/FilterComponent.php | 2 +- Model/Behavior/FilteredBehavior.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller/Component/FilterComponent.php b/Controller/Component/FilterComponent.php index 3774b03..0e6a8fb 100644 --- a/Controller/Component/FilterComponent.php +++ b/Controller/Component/FilterComponent.php @@ -280,7 +280,7 @@ public function beforeRender(Controller $controller) break; default: - continue; + continue 2; } // if no value has been set, show the default one diff --git a/Model/Behavior/FilteredBehavior.php b/Model/Behavior/FilteredBehavior.php index 0392469..1ff8579 100644 --- a/Model/Behavior/FilteredBehavior.php +++ b/Model/Behavior/FilteredBehavior.php @@ -354,7 +354,7 @@ protected function buildFilterConditions(array &$query, $field, $options, $value case 'text': if (strlen(trim(strval($value))) == 0) { - continue; + break; } $condition = $options['condition']; @@ -385,7 +385,7 @@ protected function buildFilterConditions(array &$query, $field, $options, $value case 'select': if (is_string($value) && strlen(trim(strval($value))) == 0) { - continue; + break; } $query['conditions'][$field] = $value;