]> git.mxchange.org Git - mailer.git/blobdiff - inc/inc-functions.php
Fix for missing array elements
[mailer.git] / inc / inc-functions.php
index 06e912fa06bfb3ae58c7c504dab956597790d7f8..d93731ab0dbc14ee3cc4eac0a4cfa70eb95bdd4e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 03/10/2009 *
- * ===============                              Last change: 03/10/2009 *
+ * Mailer v0.2.1-FINAL                                Start: 03/10/2009 *
+ * ===================                          Last change: 03/10/2009 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : inc-functions.php                                *
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -56,7 +57,13 @@ function setIncludePool ($pool, $includePool) {
 // Getter for INC_POOL
 function getIncludePool ($pool) {
        //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
-       return $GLOBALS['inc_pool'][$pool];
+       if (isset($GLOBALS['inc_pool'][$pool])) {
+               // Return found pool (array)
+               return $GLOBALS['inc_pool'][$pool];
+       } else {
+               // Return empty array if not found
+               return array();
+       }
 }
 
 // Count INC_POOL
@@ -121,7 +128,7 @@ function loadInclude ($inc) {
        } // END - if
 
        // Try to load it
-       require($GLOBALS['inc_loaded'][$inc]);
+       include($GLOBALS['inc_loaded'][$inc]);
 }
 
 // Loads an include file once