Ver Fonte

Fix an issue where php version is rounded wrong (#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
Jaap Marcus há 4 anos atrás
pai
commit
7ad3d40104
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      bin/v-update-web-domains-disk
  2. 1 1
      func/main.sh

+ 1 - 1
bin/v-update-web-domains-disk

@@ -35,7 +35,7 @@ is_object_valid 'user' 'USER' "$user"
 #----------------------------------------------------------#
 
 # Loop through all domains that are not suspended
-for domain in $($BIN/v-list-web-domains $user plan | cut -f 1); do 
+for domain in $($BIN/v-list-web-domains $user plain | cut -f 1); do 
     home_dir="$HOMEDIR/$user/web/$domain/"
     if [ -e "$home_dir" ]; then
         disk_usage=$(nice -n 19 du -shm $home_dir | cut -f 1 )

+ 1 - 1
func/main.sh

@@ -1308,7 +1308,7 @@ multiphp_versions() {
 
 multiphp_default_version() {
     # Get system wide default php version (set by update-alternatives)
-    local sys_phpversion=$(php -r "echo (float)phpversion();")
+    local sys_phpversion=$(php -r "echo substr(phpversion(),0,3);")
 
     # Check if the system php also has php-fpm enabled, otherwise return
     # the most recent php version which does have it installed.