Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error handler not escaping error info in debug mode #14492

Merged
merged 5 commits into from
Jul 21, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Yii Framework 2 Change Log
- Bug #14165: Set `_slave` of `Connection` to `false` instead of `null` in `close` method (rossoneri)
- Bug #14423: Fixed `ArrayHelper::merge` behavior with null values for integer-keyed elements (dmirogin)
- Chg #7936: Deprecate `yii\base\Object` in favor of `yii\base\BaseObject` for compatibility with PHP 7.2 (rob006, cebe, klimov-paul)

- Bug #14492: Fixed error handler not displaying `yii\db\Exception` error info (samdark)

2.0.12 June 05, 2017
--------------------
Expand Down
2 changes: 1 addition & 1 deletion framework/views/errorHandler/exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
<h2><?= nl2br($handler->htmlEncode($exception->getMessage())) ?></h2>

<?php if ($exception instanceof \yii\db\Exception && !empty($exception->errorInfo)): ?>
<pre>Error Info: <?php print_r($exception->errorInfo, true) ?></pre>
<pre>Error Info: <?= $handler->htmlEncode(print_r($exception->errorInfo, true)) ?></pre>
<?php endif ?>

<?= $handler->renderPreviousExceptions($exception) ?>
Expand Down