Skip to content

Commit

Permalink
Fix #19401: Delay exit(1) in yii\base\ErrorHandler::handleFatalError
Browse files Browse the repository at this point in the history
  • Loading branch information
arrilot committed Jun 1, 2022
1 parent 58afaaf commit 4d0d25d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Yii Framework 2 Change Log
- Bug #19368: Fix PHP 8.1 error when `$fileMimeType` is `null` in `yii\validators\FileValidator::validateMimeType()` (bizley)
- Enh #19384: Normalize `setBodyParams()` and `getBodyParam()` in `yii\web\Request` (WinterSilence, albertborsos)
- Bug #19386: Fix recursive calling `yii\helpers\BaseArrayHelper::htmlDecode()` (WinterSilence)
- Enh #19401: Delay `exit(1)` in `yii\base\ErrorHandler::handleFatalError` (arrilot)
- Bug #19402: Add shutdown event and fix working directory in `yii\base\ErrorHandler` (WinterSilence)
- Enh #19416: Update and improve configurations for `yii\console\controllers\MessageController` (WinterSilence)
- Bug #19403: Fix types in `yii\web\SessionIterator` (WinterSilence)
Expand Down
5 changes: 4 additions & 1 deletion framework/base/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ public function handleFatalError()

$this->trigger(static::EVENT_SHUTDOWN);

exit(1);
// ensure it is called after user-defined shutdown functions
register_shutdown_function(function() {
exit(1);
});
}
}

Expand Down

0 comments on commit 4d0d25d

Please sign in to comment.