-function addIncludeToPool ($pool, $inc) {
- //* DEBUG: */ print __FUNCTION__.':pool='.$pool.'<br />';
- $GLOBALS['inc_pool'][$pool][] = (string) $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);