Fix --memory-limit option to maintenance scripts
authorBrian Wolff <bawolff+wn@gmail.com>
Wed, 28 Mar 2018 01:20:07 +0000 (01:20 +0000)
committerBrian Wolff <bawolff+wn@gmail.com>
Wed, 28 Mar 2018 01:20:07 +0000 (01:20 +0000)
Follow up 2f293bd0. Previously this option was marked as not
taking an argument, thus if present it would have the value of
true (aka 1). Setting memory limit to 1 results in setting to
256kb, which is way too small.

Change-Id: I2a6e512e384c5ef882f7ba2877091ecb8fe01e35

maintenance/Maintenance.php

index 0c79bd5..e3b5f72 100644 (file)
@@ -508,7 +508,9 @@ abstract class Maintenance {
                $this->addOption(
                        'memory-limit',
                        'Set a specific memory limit for the script, '
-                               . '"max" for no limit or "default" to avoid changing it'
+                               . '"max" for no limit or "default" to avoid changing it',
+                       false,
+                       true
                );
                $this->addOption( 'server', "The protocol and server name to use in URLs, e.g. " .
                        "http://en.wikipedia.org. This is sometimes necessary because " .