Jelajahi Sumber

Fix check_php_version for versions that contain a patchlevel.

Thijs Kinkhorst 23 tahun lalu
induk
melakukan
df76ef5549
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      functions/global.php

+ 1 - 1
functions/global.php

@@ -53,7 +53,7 @@ function check_php_version ($a = '0', $b = '0', $c = '0')
     global $SQ_PHP_VERSION;
     global $SQ_PHP_VERSION;
 
 
     if(!isset($SQ_PHP_VERSION))
     if(!isset($SQ_PHP_VERSION))
-        $SQ_PHP_VERSION = str_pad( preg_replace('/\D/','', PHP_VERSION), 3, '0');
+        $SQ_PHP_VERSION = substr( str_pad( preg_replace('/\D/','', PHP_VERSION), 3, '0'), 0, 3);
 
 
     return $SQ_PHP_VERSION >= ($a.$b.$c);
     return $SQ_PHP_VERSION >= ($a.$b.$c);
 }
 }