From fc3f751eda4ae7e34c57522136ad84ead223e81b Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 26 Mar 2016 14:10:47 +0000 Subject: [PATCH] Fix pack.php to allow running from the downloader --- pack.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pack.php b/pack.php index eaa6aa9..92cf14a 100644 --- a/pack.php +++ b/pack.php @@ -12,8 +12,13 @@ foreach($module_index as $module) { // If the module is optional, the module's id isn't present in the command line arguments, and the special 'all' module id wasn't passed in, skip it if($module->optional && - strrpos(implode(" ", $argv), $module->id) === false && - !in_array("all", $argv)) continue; + ( + isset($argv) && + strrpos(implode(" ", $argv), $module->id) === false && + !in_array("all", $argv) + ) + ) + continue; $module_list[] = $module->id; }