From 95328fafaf92444fb6554d8a133f67fd88067921 Mon Sep 17 00:00:00 2001 From: Benjamin Lees Date: Tue, 4 Aug 2009 22:58:43 +0000 Subject: [PATCH] Suppress warnings when trying to raise the memory limit --- includes/Setup.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/Setup.php b/includes/Setup.php index 462e201899..97e6344f84 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -155,7 +155,9 @@ $memlimit = ini_get( "memory_limit" ); if( !( empty( $memlimit ) || $memlimit == -1 ) ) { if( wfParseMemoryLimit( $memlimit ) < wfParseMemoryLimit( $wgMemoryLimit ) ) { wfDebug( "\n\nRaise PHP's memory limit from $memlimit to $wgMemoryLimit\n" ); + wfEnableWarnings() ini_set( "memory_limit", $wgMemoryLimit ); + wfDisableWarnings() } } -- 2.20.1