Skip to content

Commit

Permalink
Fixed #11108 part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed May 24, 2022
1 parent 9143e5e commit 224b332
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Fixed
- Fixed a bug where it wasn’t possible to disable all table columns for an element source. ([#11291](https://github.com/craftcms/cms/issues/11291))
- Fixed a bug where the Assets index page wasn’t allowing any bulk actions for assets in the temporary volume. ([#11293](https://github.com/craftcms/cms/issues/11293))
- Fixed a bug where PHP parse errors thrown while rendering a template weren’t being handled properly. ([#11108](https://github.com/craftcms/cms/issues/11108))

## 4.0.3 - 2022-05-20

Expand Down
4 changes: 2 additions & 2 deletions src/web/TemplateResponseFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use craft\helpers\FileHelper;
use craft\helpers\StringHelper;
use craft\web\assets\iframeresizer\ContentWindowAsset;
use Twig\Error\Error as TwigError;
use Throwable;
use yii\base\Component;
use yii\base\ExitException;
use yii\base\InvalidConfigException;
Expand Down Expand Up @@ -50,7 +50,7 @@ public function format($response)
// Render and return the template
try {
$response->content = $view->renderPageTemplate($behavior->template, $behavior->variables, $behavior->templateMode);
} catch (TwigError $e) {
} catch (Throwable $e) {
if (!$e->getPrevious() instanceof ExitException) {
// Bail on the template response
$response->format = Response::FORMAT_HTML;
Expand Down

0 comments on commit 224b332

Please sign in to comment.