Skip to content

Commit

Permalink
Merge pull request #993 from cakephp/error-templates
Browse files Browse the repository at this point in the history
Clean up error templates.
  • Loading branch information
markstory committed Feb 21, 2024
2 parents adbba71 + 50ced3b commit 2fd3ace
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
16 changes: 0 additions & 16 deletions templates/Error/error400.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Database\StatementInterface $error
* @var string $message
* @var string $url
*/
use Cake\Core\Configure;
use Cake\Error\Debugger;

$this->layout = 'error';

Expand All @@ -17,21 +15,7 @@
$this->assign('templateName', 'error400.php');

$this->start('file');
?>
<?php if (!empty($error->queryString)) : ?>
<p class="notice">
<strong>SQL Query: </strong>
<?= h($error->queryString) ?>
</p>
<?php endif; ?>
<?php if (!empty($error->params)) : ?>
<strong>SQL Query Params: </strong>
<?php Debugger::dump($error->params) ?>
<?php endif; ?>

<?php
echo $this->element('auto_table_warning');

$this->end();
endif;
?>
Expand Down
11 changes: 0 additions & 11 deletions templates/Error/error500.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
/**
* @var \App\View\AppView $this
* @var \Cake\Database\StatementInterface $error
* @var string $message
* @var string $url
*/
Expand All @@ -18,16 +17,6 @@

$this->start('file');
?>
<?php if (!empty($error->queryString)) : ?>
<p class="notice">
<strong>SQL Query: </strong>
<?= h($error->queryString) ?>
</p>
<?php endif; ?>
<?php if (!empty($error->params)) : ?>
<strong>SQL Query Params: </strong>
<?php Debugger::dump($error->params) ?>
<?php endif; ?>
<?php if ($error instanceof Error) : ?>
<?php $file = $error->getFile() ?>
<?php $line = $error->getLine() ?>
Expand Down

0 comments on commit 2fd3ace

Please sign in to comment.