From: Andrew Garrett Date: Fri, 22 Aug 2008 13:02:49 +0000 (+0000) Subject: Only run hooks if Hooks.php has been loaded (i.e. we CAN run them) X-Git-Tag: 1.31.0-rc.0~45720 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=7ce4ef5002c8ddb62a3e4bcd1fcd3c9493933184;p=lhc%2Fweb%2Fwiklou.git Only run hooks if Hooks.php has been loaded (i.e. we CAN run them) --- diff --git a/includes/SiteConfiguration.php b/includes/SiteConfiguration.php index 3c25377e05..6a1a8637bb 100644 --- a/includes/SiteConfiguration.php +++ b/includes/SiteConfiguration.php @@ -221,7 +221,8 @@ class SiteConfiguration { $site = NULL; $lang = NULL; - if (!wfRunHooks( 'SiteFromDB', array( $db, &$site, &$lang ) ) ) + // Only run hooks if they *can* be run. + if (function_exists( 'wfRunHooks' ) && !wfRunHooks( 'SiteFromDB', array( $db, &$site, &$lang ) ) ) return array( $site, $lang ); foreach ( $this->suffixes as $suffix ) { if ( $suffix === '' ) {