X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffilters.php;h=d1a66567e57ec8d67f81ed989bf92da20ec85b19;hp=5cda96ebf2c825db507989015475aecf07c9bdd0;hb=26ea563a90454a2cde58f8cd134542a0d8f14780;hpb=a30da9ca393c9f03a7e2808f444d9a17357917fd diff --git a/inc/filters.php b/inc/filters.php index 5cda96ebf2..d1a66567e5 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -456,11 +456,17 @@ function FILTER_COMPILE_EXTENSION ($code) { if ((count($matches) > 0) && (count($matches[3]) > 0)) { // Replace all matches foreach ($matches[3] as $key => $cmd) { - // Construct call-back function name - $functionName = 'getExtension' . ucfirst(strtolower($cmd)); + // By default we have no extension installed, so 'false' is assumed + $replacer = 'false'; - // Call the function - $replacer = call_user_func_array($functionName, $matches[4][$key]); + // Is the extension installed? + if (isExtensionActive($matches[4][$key])) { + // Construct call-back function name + $functionName = 'getExtension' . ucfirst(strtolower($cmd)); + + // Call the function + $replacer = call_user_func_array($functionName, $matches[4][$key]); + } // END - if // Replace it and insert parameter for GET request $code = str_replace($matches[0][$key], sprintf("&%s=%s&rev=%s", $cmd, $replacer, getConfig('CURR_SVN_REVISION')), $code);