From 006c0ae27b9e2994330819c560398c9e1127ea36 Mon Sep 17 00:00:00 2001 From: Magnus Manske Date: Sat, 31 Dec 2005 20:30:22 +0000 Subject: [PATCH] Catching: getrusage() does not exist on Windows platforms --- index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 3436e572e1..6853ece7ae 100644 --- 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... -- 2.20.1