pdo_error.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * For full copyright and license information, please see the LICENSE.txt
  8. * Redistributions of files must retain the above copyright notice.
  9. *
  10. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  11. * @link https://cakephp.org CakePHP(tm) Project
  12. * @since 0.10.0
  13. * @license https://opensource.org/licenses/mit-license.php MIT License
  14. */
  15. use Cake\Error\Debugger;
  16. $this->setLayout('dev_error');
  17. $this->assign('title', 'Database Error');
  18. $this->assign('templateName', 'pdo_error.php');
  19. $this->start('subheading');
  20. ?>
  21. <strong>Error</strong>
  22. <?= h($message); ?>
  23. <?php $this->end() ?>
  24. <?php $this->start('file') ?>
  25. <p class="notice">
  26. If you are using SQL keywords as table column names, you can enable identifier
  27. quoting for your database connection in config/app.php.
  28. </p>
  29. <?php if (!empty($error->queryString)) : ?>
  30. <p class="notice">
  31. <strong>SQL Query: </strong>
  32. </p>
  33. <pre><?= h($error->queryString); ?></pre>
  34. <?php endif; ?>
  35. <?php if (!empty($error->params)) : ?>
  36. <strong>SQL Query Params: </strong>
  37. <pre><?php Debugger::dump($error->params); ?></pre>
  38. <?php endif; ?>
  39. <?= $this->element('auto_table_warning'); ?>
  40. <?php $this->end() ?>