Skip to content

Commit

Permalink
Debugger::shutdownHandler() always unsets $reserved
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jan 4, 2017
1 parent bd70b5c commit 25d5f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tracy/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ public static function shutdownHandler()
if (!self::$reserved) {
return;
}
self::$reserved = NULL;

$error = error_get_last();
if (in_array($error['type'], [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE, E_RECOVERABLE_ERROR, E_USER_ERROR], TRUE)) {
Expand All @@ -249,7 +250,6 @@ public static function shutdownHandler()
);

} elseif (self::$showBar && !self::$productionMode) {
self::$reserved = NULL;
self::removeOutputBuffers(FALSE);
self::getBar()->render();
}
Expand All @@ -264,7 +264,7 @@ public static function shutdownHandler()
*/
public static function exceptionHandler($exception, $exit = TRUE)
{
if (!self::$reserved) {
if (!self::$reserved && $exit) {
return;
}
self::$reserved = NULL;
Expand Down

0 comments on commit 25d5f74

Please sign in to comment.