From 2dac220ef1018726eab4d8e20bb0682b609f067e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 29 Sep 2012 13:07:39 +0000 Subject: [PATCH] Fix for 'array_push() expects parameter 1 to be array, null given,errfile=extensions-functions.php,errline=1541' --- inc/extensions-functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 3ac6e88460..a76925cc71 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -1536,6 +1536,12 @@ function initExtensionSqls ($force = false) { // Adds SQLs to the SQLs array but "assigns" it with current extension name function addExtensionSql ($sql) { + // Is is the array there? + if (!is_array($GLOBALS['ext_sqls'][getCurrentExtensionName()][getCurrentExtensionVersion()])) { + // Init array + $GLOBALS['ext_sqls'][getCurrentExtensionName()][getCurrentExtensionVersion()] = array(); + } // END - if + // Add it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName() . ',ext_version=' . getCurrentExtensionVersion() . ',sql=' . $sql); array_push($GLOBALS['ext_sqls'][getCurrentExtensionName()][getCurrentExtensionVersion()], $sql); -- 2.39.2