Die cleanly when not using memcached
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 16 Dec 2006 21:19:19 +0000 (21:19 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 16 Dec 2006 21:19:19 +0000 (21:19 +0000)
maintenance/stats.php

index bb19e67..25bb9cc 100644 (file)
@@ -1,6 +1,10 @@
 <?php
 require_once('commandLine.inc');
 
+if( get_class( $wgMemc ) == 'FakeMemCachedClient' ) {
+       die("You are running FakeMemCachedClient, I can not provide any statistics.\n");
+}
+
 print "Requests\n";
 $session = intval($wgMemc->get(wfMemcKey('stats','request_with_session')));
 $noSession = intval($wgMemc->get(wfMemcKey('stats','request_without_session')));