Micro-opt and return type fix.
@@ -60,8 +60,9 @@ trait FileConfigTrait
return $file;
}
- if (is_file(realpath($file))) {
- return realpath($file);
+ $realPath = realpath($file);
+ if ($realPath !== false && is_file($realPath)) {
+ return $realPath;
throw new Exception(sprintf('Could not load configuration file: %s', $file));