diff --git a/conlite/classes/template/class.clIfFunctionParser.php b/conlite/classes/template/class.clIfFunctionParser.php index fda63cf..5980a7d 100644 --- a/conlite/classes/template/class.clIfFunctionParser.php +++ b/conlite/classes/template/class.clIfFunctionParser.php @@ -135,7 +135,9 @@ class clIfFunctionParser extends clAbstractTemplateParser { } //elseif-teil else if(preg_match("/(?is)" . $this->pattern_elseif . "/", $array_match_all[0][0], $array_match_part) > 0) { - $elseifIndex = count($array2_uncompletedConstructs[$uncompletedConstructsIndex]['elseif']); + if(is_countable($array2_uncompletedConstructs[$uncompletedConstructsIndex]['elseif'])) { + $elseifIndex = count($array2_uncompletedConstructs[$uncompletedConstructsIndex]['elseif']); + } $array2_uncompletedConstructs[$uncompletedConstructsIndex]['elseif'][$elseifIndex]['condition'] = $array_match_part[1]; $array2_uncompletedConstructs[$uncompletedConstructsIndex]['elseif'][$elseifIndex]['pos_start'] = $array_match_all[0][1]; diff --git a/conlite/includes/functions.stat.php b/conlite/includes/functions.stat.php index b75e919..11622f5 100644 --- a/conlite/includes/functions.stat.php +++ b/conlite/includes/functions.stat.php @@ -87,7 +87,7 @@ function statsArchive($yearmonth) { ".Contenido_Security::toInteger($db->f(1)).", ".Contenido_Security::toInteger($db->f(2)).", ".Contenido_Security::toInteger($db->f(3)).", - ".Contenido_Security::escapeDB($db->f(4), $db2).")"; + '".Contenido_Security::escapeDB($db->f(4), $db2)."')"; $db2->query($insertSQL); }