mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Use PHP_VERSION
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
4b674ecfe3
commit
ed8c6c04d4
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,7 @@ package_manager_detect() {
|
||||||
# Check for and determine version number (major and minor) of current php install
|
# Check for and determine version number (major and minor) of current php install
|
||||||
local phpVer="php"
|
local phpVer="php"
|
||||||
if is_command php ; then
|
if is_command php ; then
|
||||||
phpVer="$(php -v 2> /dev/null | head -n1 | cut -d '-' -f1 | cut -d ' ' -f2)"
|
phpVer="$(php <<< "<?php echo PHP_VERSION ?>")"
|
||||||
# Check if the first character of the string is numeric
|
# Check if the first character of the string is numeric
|
||||||
if [[ ${phpVer:0:1} =~ [1-9] ]]; then
|
if [[ ${phpVer:0:1} =~ [1-9] ]]; then
|
||||||
printf " %b Existing PHP installation detected : PHP version %s\\n" "${INFO}" "${phpVer}"
|
printf " %b Existing PHP installation detected : PHP version %s\\n" "${INFO}" "${phpVer}"
|
||||||
|
|
Loading…
Reference in a new issue