From ed8c6c04d4e9ae70364d4ff1447cf185bf5fea7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Tue, 14 Jun 2022 23:04:31 +0200 Subject: [PATCH] Use PHP_VERSION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 0c5c21ce..f9ec9505 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -300,7 +300,7 @@ package_manager_detect() { # Check for and determine version number (major and minor) of current php install local phpVer="php" if is_command php ; then - phpVer="$(php -v 2> /dev/null | head -n1 | cut -d '-' -f1 | cut -d ' ' -f2)" + phpVer="$(php <<< "")" # Check if the first character of the string is numeric if [[ ${phpVer:0:1} =~ [1-9] ]]; then printf " %b Existing PHP installation detected : PHP version %s\\n" "${INFO}" "${phpVer}"