From bd85fa49222796f6716c68611c57dde8c63fd060 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Wed, 4 Oct 2017 00:24:56 +0100 Subject: [PATCH] Fixes #9438: yii\web\DbSession now relies on error handler to display errors --- framework/CHANGELOG.md | 1 + framework/web/DbSession.php | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index a47c10d50f5..62502e54026 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,6 +4,7 @@ Yii Framework 2 Change Log 2.0.13 under development ------------------------ +- Enh #9438: `yii\web\DbSession` now relies on error handler to display errors (samdark) - Bug #14129: Fixed console help to properly work with tricky camelcased controller names (samdark, silverfire) - Enh #14126: Added variadic parameters support to DI container (SamMousa) - Enh #14087: Added `yii\web\View::registerCsrfMetaTags()` method that registers CSRF tags dynamically ensuring that caching doesn't interfere (RobinKamps) diff --git a/framework/web/DbSession.php b/framework/web/DbSession.php index c9d8d538e0c..16c3b8d77a2 100644 --- a/framework/web/DbSession.php +++ b/framework/web/DbSession.php @@ -183,13 +183,7 @@ public function writeSession($id, $data) ->execute(); } } catch (\Exception $e) { - $exception = ErrorHandler::convertExceptionToString($e); - // its too late to use Yii logging here - error_log($exception); - if (YII_DEBUG) { - echo $exception; - } - + Yii::$app->errorHandler->handleException($e); return false; }