Skip to content

Commit 3ec3a48

Browse files
committed
UtilsSandboxLoader case-sensitive for Windows OS
UtilsSandboxLoader case-sensitive for Windows OS. This function is used by `Inphinit\Viewing\View` and `Inphinit\Experimental\Config` classes
1 parent c8bb5f9 commit 3ec3a48

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/Experimental/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function reload()
5959

6060
self::$exceptionlevel = 2;
6161

62-
if (false === File::exists(INPHINIT_PATH . $this->path)) {
62+
if (false === \Inphinit\File::exists(INPHINIT_PATH . $this->path)) {
6363
throw new Exception('File not found ' . $this->path, $level);
6464
}
6565

src/Utils.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,18 @@ function UtilsCaseSensitivePath($path)
2828
*/
2929
function UtilsSandboxLoader($utilsSandBoxPath, array $utilsSandBoxData = array())
3030
{
31+
$utilsSandBoxPath = INPHINIT_PATH . $utilsSandBoxPath;
32+
33+
if (UtilsCaseSensitivePath($utilsSandBoxPath) === false) {
34+
return false;
35+
}
36+
3137
if (empty($utilsSandBoxData) === false) {
3238
extract($utilsSandBoxData, EXTR_SKIP);
3339
$utilsSandBoxData = null;
3440
}
3541

36-
return include INPHINIT_PATH . $utilsSandBoxPath;
42+
return include $utilsSandBoxPath;
3743
}
3844

3945
/**
@@ -198,7 +204,7 @@ function UtilsConfig()
198204
define('REQUEST_TIME', time());
199205
define('EOL', chr(10));
200206

201-
foreach (\UtilsSandboxLoader('application/Config/config.php') as $key => $value) {
207+
foreach (UtilsSandboxLoader('application/Config/config.php') as $key => $value) {
202208
App::env($key, $value);
203209
}
204210

0 commit comments

Comments
 (0)