Fix fatal error when $wgProfiling = false;
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 26 Dec 2005 22:35:47 +0000 (22:35 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 26 Dec 2005 22:35:47 +0000 (22:35 +0000)
includes/LinkCache.php

index dd87fce..f96fdf4 100644 (file)
@@ -135,8 +135,8 @@ class LinkCache {
                if ( 0 != $id ) { return $id; }
 
                $fname = 'LinkCache::addLinkObj';
-               global $wgProfiler;
-               if ( isset( $wgProfiler ) ) {
+               global $wgProfiling, $wgProfiler;
+               if ( $wgProfiling && isset( $wgProfiler ) ) {
                        $fname .= ' (' . $wgProfiler->getCurrentSection() . ')';
                }