Skip to content

Commit 7ad3d40

Browse files
authored
Fix an issue where php version is rounded wrong (hestiacp#2340)
* Fix an issue where php version is rounded wrong php -r "echo (float)phpversion();" return 8 instead 8.0 causing issue with default.tpl template selection * Fix typo in commannd
1 parent 661ec27 commit 7ad3d40

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/v-update-web-domains-disk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ is_object_valid 'user' 'USER' "$user"
3535
#----------------------------------------------------------#
3636

3737
# Loop through all domains that are not suspended
38-
for domain in $($BIN/v-list-web-domains $user plan | cut -f 1); do
38+
for domain in $($BIN/v-list-web-domains $user plain | cut -f 1); do
3939
home_dir="$HOMEDIR/$user/web/$domain/"
4040
if [ -e "$home_dir" ]; then
4141
disk_usage=$(nice -n 19 du -shm $home_dir | cut -f 1 )

func/main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ multiphp_versions() {
13081308

13091309
multiphp_default_version() {
13101310
# Get system wide default php version (set by update-alternatives)
1311-
local sys_phpversion=$(php -r "echo (float)phpversion();")
1311+
local sys_phpversion=$(php -r "echo substr(phpversion(),0,3);")
13121312

13131313
# Check if the system php also has php-fpm enabled, otherwise return
13141314
# the most recent php version which does have it installed.

0 commit comments

Comments
 (0)