// Is that filter chain there?
if (!isset($GLOBALS['cache_array']['filter']['chains'][$filterName])) {
- // Log not found filters in debug-mode
+ // Filter chain not found filters in debug-mode
if (isDebugModeEnabled()) {
// Log it away...
logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' does not exist.');
}
// Loads given library (aka. PHP extension)
-// Credits: shaunspiller at spammenot-gmail dot com ( http://de.php.net/dl#88566 )
function loadLibrary ($n, $f = NULL) {
- return extension_loaded($n) or dl(((PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '') . ($f ? $f : $n) . '.' . PHP_SHLIB_SUFFIX);
+ // Is the actual function dl() available? (Not on all SAPIs since 5.3)
+ if (!is_callable('dl')) {
+ // Not callable
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'dl() is not callable for n=' . $n . ',f[' . gettype($f) . ']=' . $f);
+ return FALSE;
+ } // END - if
+
+ // Try to load PHP library
+ return dl(((PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '') . ($f ? $f : $n) . '.' . PHP_SHLIB_SUFFIX);
}
// "Translates" given PHP extension name into a readable version