-function addIncludeToPool ($pool, $inc) {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'pool=' . $pool);
- array_push($GLOBALS['inc_pool'][$pool], $inc);
+function addIncludeToPool ($poolName, $includeFileName) {
+ // Is the pool initialized?
+ if (!isset($GLOBALS['inc_pool'][$poolName])) {
+ // Not initialized with initIncludePool()
+ reportBug(__FUNCTION__, __LINE__, sprintf("Pool %s is not initialized, not adding include %s.", $poolName, $includeFileName));
+ } // END - if
+
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'poolNAme=' . $poolNAme);
+ array_push($GLOBALS['inc_pool'][$poolName], $includeFileName);