From 0eef0fc1ddc63feb8bf9ec24c6b982c91448b4ae Mon Sep 17 00:00:00 2001 From: Tim Bishop Date: Wed, 31 Oct 2018 18:11:41 +0000 Subject: [PATCH] Sync with develop branch. (#6377) Without this change argv[1] is ignored. --- upgrade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upgrade.php b/upgrade.php index b403172770..a669c5f08e 100644 --- a/upgrade.php +++ b/upgrade.php @@ -13,7 +13,9 @@ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { } -((array_key_exists('1',$argv[1]))) ? $branch = $argv[1] : $branch = 'master'; +// Check if a branch or tag was passed in the command line, +// otherwise just use master +(array_key_exists('1', $argv)) ? $branch = $argv[1] : $branch = 'master'; echo "Welcome to the Snipe-IT upgrader.\n\n"; echo "Please note that this script will not download the latest Snipe-IT \n";