#217 - Fixed open_basedir raises when 'Unknown' is passed to is_file

This commit is contained in:
Andreas Kluth
2014-07-09 17:03:36 +02:00
parent 806ab0007a
commit a51b8a8f23
+8 -3
View File
@@ -105,9 +105,14 @@ class Frame implements Serializable
{
if($this->fileContentsCache === null && $filePath = $this->getFile()) {
// Return null if the file doesn't actually exist - this may
// happen in cases where the filename is provided as, for
// example, 'Unknown'
// Leave the stage early when 'Unknown' is passed
// this would otherwise raise an exception when
// open_basedir is enabled.
if($filePath === "Unknown") {
return null;
}
// Return null if the file doesn't actually exist.
if(!is_file($filePath)) {
return null;
}