diff --git a/fp-includes/fp-smartyplugins/validate_criteria.notEmpty.php b/fp-includes/fp-smartyplugins/validate_criteria.notEmpty.php index 0809cc0..2fd043a 100644 --- a/fp-includes/fp-smartyplugins/validate_criteria.notEmpty.php +++ b/fp-includes/fp-smartyplugins/validate_criteria.notEmpty.php @@ -34,7 +34,10 @@ * @param array formvars form var values */ function smarty_validate_criteria_notEmpty($value, $empty, &$params, &$formvars) { - return strlen($value) > 0; + if(empty($value)) { + return false; + } else { + return strlen($value) > 0; + } } - ?> diff --git a/fp-plugins/bbcode/inc/stringparser.class.php b/fp-plugins/bbcode/inc/stringparser.class.php index 2230b03..81b0a18 100755 --- a/fp-plugins/bbcode/inc/stringparser.class.php +++ b/fp-plugins/bbcode/inc/stringparser.class.php @@ -298,6 +298,7 @@ class StringParser { $this->_parsing = true; $this->_text = $this->_applyPrefilters($text); $this->_output = null; + $this->_text = $this->_text ?? ''; $this->_length = strlen($this->_text); $this->_cpos = 0; unset($this->_stack);