From aa77e126c7ef02d96e96ac059f3fcfc1577d088b Mon Sep 17 00:00:00 2001 From: Zauberfisch Date: Tue, 17 Feb 2015 04:33:40 +0000 Subject: [PATCH] Fixed infinity loop when searching _ss_environment --- core/Constants.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/Constants.php b/core/Constants.php index d54993c31..574773fc9 100644 --- a/core/Constants.php +++ b/core/Constants.php @@ -50,13 +50,11 @@ foreach ($dirsToCheck as $dir) { //check this dir and every parent dir (until we hit the base of the drive) // or until we hit a dir we can't read while(true) { - //add the trailing slash we need to concatenate properly - $dir .= DIRECTORY_SEPARATOR; //if it's readable, go ahead if (@is_readable($dir)) { //if the file exists, then we include it, set relevant vars and break out - if (file_exists($dir . $envFile)) { - define('SS_ENVIRONMENT_FILE', $dir . $envFile); + if (file_exists($dir . DIRECTORY_SEPARATOR . $envFile)) { + define('SS_ENVIRONMENT_FILE', $dir . DIRECTORY_SEPARATOR . $envFile); include_once(SS_ENVIRONMENT_FILE); //break out of BOTH loops because we found the $envFile break(2);