Catching: getrusage() does not exist on Windows platforms
authorMagnus Manske <magnusmanske@users.mediawiki.org>
Sat, 31 Dec 2005 20:30:22 +0000 (20:30 +0000)
committerMagnus Manske <magnusmanske@users.mediawiki.org>
Sat, 31 Dec 2005 20:30:22 +0000 (20:30 +0000)
index.php

index 3436e57..6853ece 100644 (file)
--- a/index.php
+++ b/index.php
@@ -4,7 +4,13 @@
  * @package MediaWiki
  */
 $wgRequestTime = microtime();
-$wgRUstart = getrusage();
+
+# getrusage() does not exist on the Window$ platform, catching this
+if ( function_exists ( 'getrusage' ) ) {
+       $wgRUstart = getrusage();
+} else {
+       $wgRUstart = array() ;
+}
 
 unset( $IP );
 @ini_set( 'allow_url_fopen', 0 ); # For security...