Skip to content

Commit

Permalink
array check
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr-ru committed Jun 4, 2020
1 parent 583425d commit 777cc74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TemplateObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 777cc74

Please sign in to comment.