From c0329c3e390bd73218993881f99ea451fc9a6d34 Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 25 Jan 2011 22:42:53 +0000 Subject: [PATCH] The function wfShorthandToInteger() is precisely for that. The previous way only worked for megabytes, which made it 'raise' the memory limit from several gigabytes to 50M --- includes/installer/Installer.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index c33606c466..507ba2ebc6 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -748,11 +748,7 @@ abstract class Installer { return true; } - $n = intval( $limit ); - - if( preg_match( '/^([0-9]+)[Mm]$/', trim( $limit ), $m ) ) { - $n = intval( $m[1] * ( 1024 * 1024 ) ); - } + $n = wfShorthandToInteger( $limit ); if( $n < $this->minMemorySize * 1024 * 1024 ) { $newLimit = "{$this->minMemorySize}M"; -- 2.20.1