From d4a20eb7359352de3b9fc0f5bf7806a67b5205dd Mon Sep 17 00:00:00 2001 From: Oldperl <44996956+oldperl@users.noreply.github.com> Date: Mon, 7 Oct 2019 13:12:20 +0000 Subject: [PATCH] PHP7 and MySQL fixes --- conlite/classes/template/class.clIfFunctionParser.php | 4 +++- conlite/includes/functions.stat.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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); }