Skip to content

Commit

Permalink
fix: ensure $error is actually set, not just empty
Browse files Browse the repository at this point in the history
The variable is undefined when debug is off, which means that this template itself results in an error.
Changed conditional to use `isset()` instead.

Signed-off-by: Matthew Weier O'Phinney <[email protected]>
  • Loading branch information
weierophinney committed Jun 13, 2024
1 parent 12fe619 commit ce2ef92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/error/error.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="/chat">contact us via chat</a>.
</p>

<?php if (! empty($error)) : ?>
<?php if (isset($error)) : ?>
<pre><?= $this->e($error) ?></pre>
<?php endif ?>
</section>

0 comments on commit ce2ef92

Please sign in to comment.