mirror of
https://github.com/filp/whoops.git
synced 2026-09-15 12:16:18 +00:00
Prevent exception when caught exception frame is not related to real file
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user