From 10bc35d604802b016d84600f10912e5fbd45f82a Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 28 Sep 2018 12:13:35 -0700 Subject: [PATCH] Fixed PHP warning Undefined offset: 1 in upgrade.php --- upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade.php b/upgrade.php index 3c7889b455..b403172770 100644 --- a/upgrade.php +++ b/upgrade.php @@ -13,7 +13,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { } -($argv[1]) ? $branch = $argv[1] : $branch = 'master'; +((array_key_exists('1',$argv[1]))) ? $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";