mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding stack trace output to the framework errors.
This commit is contained in:
parent
01eb0bf07d
commit
09fd8ba463
17 changed files with 47 additions and 15 deletions
|
@ -40,7 +40,9 @@ class CakeErrorController extends AppController {
|
|||
function beforeRender() {
|
||||
parent::beforeRender();
|
||||
foreach ($this->viewVars as $key => $value) {
|
||||
$this->viewVars[$key] = h($value);
|
||||
if (!is_object($value)){
|
||||
$this->viewVars[$key] = h($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -200,7 +200,8 @@ class ErrorHandler {
|
|||
$this->controller->set(array(
|
||||
'code' => $code,
|
||||
'url' => h($url),
|
||||
'name' => $error->getMessage()
|
||||
'name' => $error->getMessage(),
|
||||
'error' => $error,
|
||||
));
|
||||
$this->controller->set($error->getAttributes());
|
||||
$this->_outputMessage($this->template);
|
||||
|
|
|
@ -41,4 +41,5 @@ class <?php echo $controller;?> extends AppController {
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s.'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_action.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -36,4 +36,6 @@ class <?php echo $class;?> extends ModelBehavior {
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_class.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -37,3 +37,5 @@ class <?php echo $class;?> extends ModelBehavior {
|
|||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_behavior_file.ctp'); ?>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -36,4 +36,6 @@ class <?php echo $class;?> extends Component {<br />
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_class.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -36,4 +36,6 @@ class <?php echo $class;?> extends Component {<br />
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_component_file.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -29,4 +29,6 @@
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s.'), APP_DIR . DS . 'views' . DS . 'errors' . DS . basename(__FILE__)); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -36,4 +36,6 @@ class <?php echo $controller;?> extends AppController {
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_controller.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
||||
|
|
|
@ -29,4 +29,6 @@
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_scaffolddb.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -36,4 +36,6 @@ class <?php echo $class;?> extends AppHelper {
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_class.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -37,3 +37,5 @@ class <?php echo $class;?> extends AppHelper {
|
|||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_helper_file.ctp'); ?>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -29,4 +29,6 @@
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_layout.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -25,4 +25,6 @@
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_table.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -29,4 +29,6 @@
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'missing_view.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -25,4 +25,6 @@
|
|||
<p class="notice">
|
||||
<strong><?php echo __('Notice'); ?>: </strong>
|
||||
<?php printf(__('If you want to customize this error message, create %s'), APP_DIR . DS . 'views' . DS . 'errors' . DS . 'private_action.ctp'); ?>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
|
@ -32,4 +32,6 @@ function _scaffoldError() {<br />
|
|||
|
||||
}
|
||||
?>
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<?php echo $this->element('exception_stack_trace'); ?>
|
Loading…
Add table
Reference in a new issue