From 4e59b838850bd7b315ff4adbb1cba6788713ea80 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 24 Jan 2024 13:23:10 +0000 Subject: [PATCH] Merge pull request #14128 from snipe/jerm/upgrade-dot-php Add remote requirements checking to upgrade.php --- upgrade.php | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/upgrade.php b/upgrade.php index a287e3d1de..dc03797954 100644 --- a/upgrade.php +++ b/upgrade.php @@ -1,8 +1,24 @@ =')) && (version_compare(ph echo "Snipe-IT requires PHP versions between ".$php_min_works." and ".$php_max_wontwork.".\n"; echo "Please install a compatible version of PHP and re-run this script again. \n"; echo "!!!!!!!!!!!!!!!!!!!!!!!!! ABORTING THE UPGRADER !!!!!!!!!!!!!!!!!!!!!!\n"; - exit; + exit(1); } echo "Checking Required PHP extensions... \n\n"; @@ -240,7 +256,7 @@ if ($ext_missing!='') { echo "ABORTING THE INSTALLER \n"; echo "Please install the extensions above and re-run this script.\n"; echo "--------------------------------------------------------\n"; - exit; + exit(1); } else { echo $ext_installed."\n"; @@ -295,6 +311,7 @@ if ($dirs_not_writable!='') { echo "--------------------- !! ERROR !! ----------------------\n"; echo "Please check the permissions on the directories above and re-run this script.\n"; echo "------------------------- :( ---------------------------\n\n"; + exit(1); }