diff --git a/TemplateObject.php b/TemplateObject.php index 68d93b2..1befde5 100644 --- a/TemplateObject.php +++ b/TemplateObject.php @@ -348,11 +348,11 @@ function setVarArray($arr) //TODO: remove set block in next release //see https://github.com/Aleksandr-ru/TemplateObject/commit/4520ffffaa0864bd8503813b1f65a5e9630a2a95 if($b = $this->setBlock($key)) { - if(self::array_has_string_keys($vv)) { + if(is_array($vv) && self::array_has_string_keys($vv)) { $b->setVarArray($vv); } else { - $this->debug and trigger_error("Numeric array given for variables in block '$key'", E_USER_WARNING); + $this->debug and trigger_error("Incorrect variables array for block '$key'", E_USER_WARNING); } } }