Sfoglia il codice sorgente

Merge branch 'master' of https://github.com/unaio/una

AntonLV 5 anni fa
parent
commit
49b95f55e3
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 1 1
      inc/classes/BxDolInstallerUtils.php
  2. 2 2
      inc/utils.inc.php

+ 1 - 1
inc/classes/BxDolInstallerUtils.php

@@ -21,7 +21,7 @@ class BxDolInstallerUtils extends BxDolIO
 
 
     static public function isAllowUrlInclude()
     static public function isAllowUrlInclude()
     {
     {
-        if (version_compare(phpversion(), "5.2", ">") == 1) {
+        if (version_compare(phpversion(), "5.2", ">") == 1 && version_compare(phpversion(), "8.0", "<") == 1) {
             $sAllowUrlInclude = ini_get('allow_url_include');
             $sAllowUrlInclude = ini_get('allow_url_include');
             return !($sAllowUrlInclude == 0);
             return !($sAllowUrlInclude == 0);
         };
         };

+ 2 - 2
inc/utils.inc.php

@@ -942,7 +942,7 @@ function bx_file_get_contents($sFileUrl, $aParams = array(), $sMethod = 'get', $
 
 
         if ($aCustomCurlParams)
         if ($aCustomCurlParams)
             foreach ($aCustomCurlParams as $sName => $mixedValue)
             foreach ($aCustomCurlParams as $sName => $mixedValue)
-                curl_setopt($rConnect, constant($sName), $mixedValue);
+                curl_setopt($rConnect, $sName, $mixedValue);
 
 
         $sResult = curl_exec($rConnect);
         $sResult = curl_exec($rConnect);
 
 
@@ -1718,7 +1718,7 @@ function bx_check_minimal_requirements ($bShowHttpError = false)
     $aErrors[] = (ini_get('safe_mode') == 0) ? '' : '<b>safe_mode</b> is on (you need to disable it)';
     $aErrors[] = (ini_get('safe_mode') == 0) ? '' : '<b>safe_mode</b> is on (you need to disable it)';
     $aErrors[] = (version_compare(PHP_VERSION, '5.3.0', '<')) ? 'PHP version is too old (please update to <b>PHP 5.3.0</b> at least)' : '';
     $aErrors[] = (version_compare(PHP_VERSION, '5.3.0', '<')) ? 'PHP version is too old (please update to <b>PHP 5.3.0</b> at least)' : '';
     $aErrors[] = (!extension_loaded( 'mbstring')) ? '<b>mbstring</b> extension not installed (the script cannot work without it)' : '';
     $aErrors[] = (!extension_loaded( 'mbstring')) ? '<b>mbstring</b> extension not installed (the script cannot work without it)' : '';
-    $aErrors[] = (ini_get('allow_url_include') == 0) ? '' : '<b>allow_url_include</b> is on (you need to disable it, or your site will be unsafe)';
+    $aErrors[] = (ini_get('allow_url_include') == 0 || version_compare(PHP_VERSION, '8.0.0', '>=')) ? '' : '<b>allow_url_include</b> is on (you need to disable it, or your site will be unsafe)';
 
 
     $aErrors = array_diff($aErrors, array('')); // delete empty
     $aErrors = array_diff($aErrors, array('')); // delete empty