Prevent exception when caught exception frame is not related to real file

This commit is contained in:
SilverFire - Dmitry Naumenko
2018-10-22 13:41:25 +03:00
parent a9f129b99d
commit 388bcebb9d
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -1,6 +1,7 @@
# 2.3.0
* Show previous exception messages.
* Prevent exception in Whoops when caught exception frame is not related to real file
# 2.2.0
+2 -2
View File
@@ -112,10 +112,10 @@ class Frame implements Serializable
public function getFileContents()
{
if ($this->fileContentsCache === null && $filePath = $this->getFile()) {
// Leave the stage early when 'Unknown' is passed
// Leave the stage early when 'Unknown' or '[internal]' is passed
// this would otherwise raise an exception when
// open_basedir is enabled.
if ($filePath === "Unknown") {
if ($filePath === "Unknown" || $filePath === '[internal]') {
return null;
}