* [FIX] Fixed wrong behavior on IIS-PHP (Windows). Thanks to @davidpsc for the feedback. Related #276

This commit is contained in:
nuxsmin
2017-07-31 12:37:41 +02:00
parent a7fb09d6b3
commit 8cf3abc2ef
2 changed files with 6 additions and 5 deletions

View File

@@ -323,9 +323,10 @@ class Init
private static function setPaths()
{
// Calcular los directorios raíz
$dir = substr(__DIR__, 0, strpos(__DIR__, str_replace('\\', '/', __NAMESPACE__)) - 1);
// $dir = substr(__DIR__, 0, strpos(__DIR__, str_replace('\\', '/', __NAMESPACE__)) - 1);
// self::$SERVERROOT = substr($dir, 0, strripos($dir, DIRECTORY_SEPARATOR));
self::$SERVERROOT = substr($dir, 0, strripos($dir, DIRECTORY_SEPARATOR));
self::$SERVERROOT = dirname(BASE_DIR);
self::$SUBURI = str_replace("\\", '/', substr(realpath($_SERVER['SCRIPT_FILENAME']), strlen(self::$SERVERROOT)));
@@ -354,7 +355,7 @@ class Init
self::$WEBROOT = '/' . self::$WEBROOT;
}
$protocol = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https://' : 'http://';
self::$WEBURI .= $protocol . $_SERVER['HTTP_HOST'] . self::$WEBROOT;
}

View File

@@ -353,7 +353,7 @@ class Util
* Devuelve información sobre la aplicación.
*
* @param string $index con la key a devolver
* @return array con las propiedades de la aplicación
* @return array|string con las propiedades de la aplicación
*/
public static function getAppInfo($index = null)
{
@@ -386,7 +386,7 @@ class Util
*/
public static function getVersion($retBuild = false, $normalized = false)
{
$build = 17073101;
$build = 17073102;
$version = [2, 1, 12];
if ($normalized === true) {