From b44669397a7bef4dcaf58e9d5d665a432cc5212a Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Wed, 15 Apr 2020 16:37:09 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#1119 --- wire/core/Sanitizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wire/core/Sanitizer.php b/wire/core/Sanitizer.php index 39e81487..e68cf3b2 100644 --- a/wire/core/Sanitizer.php +++ b/wire/core/Sanitizer.php @@ -459,7 +459,7 @@ class Sanitizer extends Wire { if(ctype_alpha($value) && strlen($value) <= $maxLength) return $value; // simple 1-word attributes // remove any non ":_a-zA-Z" characters from beginning of attribute name - while(strpos(":_$this->alphaASCII", substr($value, 0, 1)) === false && strlen($value)) { + while(strlen($value) && strpos(":_$this->alphaASCII", substr($value, 0, 1)) === false) { $value = substr($value, 1); }