Fix for 'array_push() expects parameter 1 to be array, null given,errfile=extensions...
authorRoland Häder <roland@mxchange.org>
Sat, 29 Sep 2012 13:07:39 +0000 (13:07 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 29 Sep 2012 13:07:39 +0000 (13:07 +0000)
inc/extensions-functions.php

index 3ac6e884603d8550f7edb6564cd55d3ca58f8d49..a76925cc71ac5ce2e1df78fe395bc152d4bf6f3e 100644 (file)
@@ -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);