From d496179544bca35fcf48fa3c6b62edb7c4ee6f25 Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Sat, 12 Dec 2015 07:50:54 +0100 Subject: [PATCH] * [FIX] Fixes #169. Fixed path and directory separators to be system independent. Thanks to @stawiu --- inc/Init.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/Init.class.php b/inc/Init.class.php index 83fa6e66..bdcbe057 100644 --- a/inc/Init.class.php +++ b/inc/Init.class.php @@ -256,7 +256,7 @@ class Init $class = (strripos($class, '\\')) ? substr($class, strripos($class, '\\') + 1) : $class; // Buscar la clase en los directorios de include - foreach (explode(':', get_include_path()) as $includePath) { + foreach (explode(PATH_SEPARATOR, get_include_path()) as $includePath) { $classFile = $includePath . DIRECTORY_SEPARATOR . $class . '.class.php'; if (is_readable($classFile)) { require $classFile; @@ -309,7 +309,7 @@ class Init // Calcular los directorios raĆ­z $dir = (defined(__DIR__)) ? __DIR__ : dirname(__FILE__); - self::$SERVERROOT = substr($dir, 0, strripos($dir, '/')); + self::$SERVERROOT = substr($dir, 0, strripos($dir, DIRECTORY_SEPARATOR)); self::$_SUBURI = str_replace("\\", '/', substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(self::$SERVERROOT)));