Skip to content

Commit

Permalink
Always enable debug mode on localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Oct 12, 2024
1 parent 0e18da0 commit 8d2d352
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion formwork/views/errors/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h2>Oops, something went wrong!</h2>
<p>Formwork encountered an error while serving your request.<br>If you are the maintainer of this site, please check Formwork configuration or the server log for errors.</p>
<p><a href="https://github.com/getformwork/formwork/issues" target="_blank">Report an issue to GitHub</a></p>
<?php if ($throwable && $app->config()->get('system.debug.enabled', false)) : ?>
<?php if ($throwable && ($app->config()->get('system.debug.enabled', false) || $app->request()->isLocalhost())) : ?>
<?php $this->insert('errors.partials.debug') ?>
<?php endif ?>
<?php $this->insert('errors.partials.footer') ?>
2 changes: 1 addition & 1 deletion panel/views/errors/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<?php if (isset($action)) : ?><a class="action" href="<?= $action['href'] ?>"><?= $action['label'] ?></a><?php endif ?>
</div>
</div>
<?php if ($app->config()->get('system.debug.enabled') && isset($throwable)) : ?>
<?php if (isset($throwable) && ($app->config()->get('system.debug.enabled') || $app->request()->isLocalhost())) : ?>
<div class="container-full">
<div class="error-debug-details">
<h3>Uncaught <code><?= $throwable::class ?></code>: <?= $throwable->getMessage() ?></h3>
Expand Down

0 comments on commit 8d2d352

Please sign in to comment.