This commit is contained in:
Bastian Allgeier
2020-07-07 12:40:13 +02:00
parent 5f025ac2c2
commit f79d2e960c
176 changed files with 10532 additions and 5343 deletions

View File

@@ -119,7 +119,11 @@ class Frame implements Serializable
return null;
}
$this->fileContentsCache = file_get_contents($filePath);
try {
$this->fileContentsCache = file_get_contents($filePath);
} catch (ErrorException $exception) {
// Internal file paths of PHP extensions cannot be opened
}
}
return $this->fileContentsCache;
@@ -187,7 +191,7 @@ class Frame implements Serializable
* $frame->getFileLines(); // => array( 0 => '<?php', 1 => '...', ...)
* @example
* Get one line for this file, starting at line 10 (zero-indexed, remember!)
* $frame->getFileLines(9, 1); // array( 10 => '...', 11 => '...')
* $frame->getFileLines(9, 1); // array( 9 => '...' )
*
* @throws InvalidArgumentException if $length is less than or equal to 0
* @param int $start

View File

@@ -61,7 +61,7 @@ class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, C
if (!$frame instanceof Frame) {
throw new UnexpectedValueException(
"Callable to " . __METHOD__ . " must return a Frame object"
"Callable to " . __CLASS__ . "::map must return a Frame object"
);
}

View File

@@ -252,7 +252,7 @@ class Inspector
}
if (!extension_loaded('xdebug') || !xdebug_is_enabled()) {
return [];
return $traces;
}
// Use xdebug to get the full stack trace and remove the shutdown handler stack trace