From 18ceafeb60eda8b9b552694781d3d445487aad14 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 6 Mar 2020 19:25:05 +0100 Subject: [PATCH] Ensured only empty strings are checked while verifying empty value on custom slug --- module/Core/src/Validation/ShortUrlMetaInputFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Core/src/Validation/ShortUrlMetaInputFilter.php b/module/Core/src/Validation/ShortUrlMetaInputFilter.php index 604f2648..6237daf7 100644 --- a/module/Core/src/Validation/ShortUrlMetaInputFilter.php +++ b/module/Core/src/Validation/ShortUrlMetaInputFilter.php @@ -44,7 +44,7 @@ class ShortUrlMetaInputFilter extends InputFilter // empty, is by using the deprecated setContinueIfEmpty $customSlug = $this->createInput(self::CUSTOM_SLUG, false)->setContinueIfEmpty(true); $customSlug->getFilterChain()->attach(new Validation\SluggerFilter()); - $customSlug->getValidatorChain()->attach(new Validator\NotEmpty()); + $customSlug->getValidatorChain()->attach(new Validator\NotEmpty(Validator\NotEmpty::STRING)); $this->add($customSlug); $this->add($this->createPositiveNumberInput(self::MAX_VISITS));