]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions-functions.php
Better check
[mailer.git] / inc / extensions-functions.php
index 3ac6e884603d8550f7edb6564cd55d3ca58f8d49..6c07db542b0dfec763e9eefe7104352e7bc4bb17 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 ((!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()][getCurrentExtensionVersion()])) || (!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);