From: Max Semenik Date: Sun, 17 Oct 2010 08:59:34 +0000 (+0000) Subject: Fix for r74849: use 'default' instead of 0 to indicate no memory-limit change. X-Git-Tag: 1.31.0-rc.0~34472 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=bf3586acc054243891028234a3dd497cba3ce2e3;p=lhc%2Fweb%2Fwiklou.git Fix for r74849: use 'default' instead of 0 to indicate no memory-limit change. --- diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index e4164e5190..a4c574be65 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -351,7 +351,7 @@ abstract class Maintenance { $this->addOption( 'conf', 'Location of LocalSettings.php, if not default', false, true ); $this->addOption( 'wiki', 'For specifying the wiki ID', false, true ); $this->addOption( 'globals', 'Output globals at the end of processing for debugging' ); - $this->addOption( 'memory-limit', 'Set a specific memory limit for the script, -1 for no limit or 0 to avoid changing it' ); + $this->addOption( 'memory-limit', 'Set a specific memory limit for the script, -1 for no limit or "default" to avoid changing it' ); // If we support a DB, show the options if ( $this->getDbType() > 0 ) { $this->addOption( 'dbuser', 'The DB user to use for this script', false, true ); @@ -476,7 +476,7 @@ abstract class Maintenance { * Adjusts PHP's memory limit to better suit our needs, if needed. */ protected function adjustMemoryLimit() { - if ( $this->memoryLimit() != 0 ) { + if ( $this->memoryLimit() != 'default' ) { ini_set( 'memory_limit', $this->memoryLimit() ); } }