From 7ce4ef5002c8ddb62a3e4bcd1fcd3c9493933184 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 22 Aug 2008 13:02:49 +0000 Subject: [PATCH] Only run hooks if Hooks.php has been loaded (i.e. we CAN run them) --- includes/SiteConfiguration.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 === '' ) { -- 2.20.1