From 33cc60c8f6754ffdaa5bfc431bd753d6ee58332a Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Tue, 16 Jun 2026 12:52:31 -0400 Subject: [PATCH] fix: Allow Variables type in isValid() --- src/Form/V3/FoldersVariable.php | 3 ++- src/Form/V3/LongemailVariable.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Form/V3/FoldersVariable.php b/src/Form/V3/FoldersVariable.php index 966b61c..45166cb 100644 --- a/src/Form/V3/FoldersVariable.php +++ b/src/Form/V3/FoldersVariable.php @@ -2,6 +2,7 @@ namespace Ingo\Form\V3; +use Horde\Util\Variables; use Horde\Form\V3\BaseVariable; use Horde_Variables; @@ -29,7 +30,7 @@ class FoldersVariable extends BaseVariable public $_folder; public $newFolderSet; - public function isValid($vars, $value): bool + public function isValid(Horde_Variables|Variables $vars, $value): bool { if ($this->newFolderSet || strlen($value)) { return true; diff --git a/src/Form/V3/LongemailVariable.php b/src/Form/V3/LongemailVariable.php index 656c1ee..40d43c3 100644 --- a/src/Form/V3/LongemailVariable.php +++ b/src/Form/V3/LongemailVariable.php @@ -2,6 +2,7 @@ namespace Ingo\Form\V3; +use Horde\Util\Variables; use Horde\Form\V3\LongtextVariable; use Horde_Variables; @@ -31,7 +32,7 @@ class LongemailVariable extends LongtextVariable { /** */ - public function isValid(Horde_Variables $vars, $value): bool + public function isValid(Horde_Variables|Variables $vars, $value): bool { $value = trim((string) $value);