Fixes #294
This commit is contained in:
Frank Hochmuth 2024-01-03 01:03:57 +01:00 committed by GitHub
commit f1811c9181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -34,7 +34,10 @@
* @param array formvars form var values * @param array formvars form var values
*/ */
function smarty_validate_criteria_notEmpty($value, $empty, &$params, &$formvars) { function smarty_validate_criteria_notEmpty($value, $empty, &$params, &$formvars) {
if(empty($value)) {
return false;
} else {
return strlen($value) > 0; return strlen($value) > 0;
} }
}
?> ?>

View File

@ -298,6 +298,7 @@ class StringParser {
$this->_parsing = true; $this->_parsing = true;
$this->_text = $this->_applyPrefilters($text); $this->_text = $this->_applyPrefilters($text);
$this->_output = null; $this->_output = null;
$this->_text = $this->_text ?? '';
$this->_length = strlen($this->_text); $this->_length = strlen($this->_text);
$this->_cpos = 0; $this->_cpos = 0;
unset($this->_stack); unset($this->_stack);