SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/system/error_development.php

  1. <?php
  2. /*
  3.  * kate: tab-width 4; indent-width 4; space-indent on; word-wrap off; word-wrap-column 120;
  4.  * :tabSize=4:indentSize=4:noTabs=true:wrap=false:maxLineLen=120:mode=php:
  5.  *
  6.  * Copyright (C) 2015 Karmabunny Pty Ltd.
  7.  *
  8.  * This file is a part of SproutCMS.
  9.  *
  10.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  11.  * of the GNU General Public License as published by the Free Software Foundation, either
  12.  * version 3 of the License, or (at your option) any later version.
  13.  *
  14.  * For more information, visit <http://getsproutcms.com>.
  15.  */
  16.  
  17. use Sprout\Helpers\Enc;
  18. use Sprout\Helpers\Sprout;
  19.  
  20. header('Content-type: text/html; charset=UTF-8');
  21. ?>
  22. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  23. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  24. <head>
  25. <style type="text/css">
  26. <?php readfile(__DIR__ . '/../../../media/css/error_development.css'); ?>
  27. </style>
  28. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  29. <title><?php echo Enc::html($error) ?></title>
  30. <base href="http://php.net/" />
  31. </head>
  32. <body>
  33. <div id="framework_error">
  34. <h3><?php echo Enc::html($error) ?></h3>
  35. <p><?php echo Enc::html($description) ?></p>
  36. <?php if ( ! empty($line) AND ! empty($file)): ?>
  37. <p><?php echo Kohana::lang('core.error_file_line', $file, $line) ?></p>
  38. <?php endif ?>
  39. <p><code class="block"><?php echo Enc::html($message) ?></code></p>
  40. <?php if (preg_match('/^SQLSTATE\[(?:42S22|42S02)\]/', $message)): ?>
  41. <p class="helpful-msg"><a href="<?php echo Enc::html(Sprout::absRoot()); ?>dbtools/sync">You can probably <span>run a DB sync</span> to fix this problem</a></p>
  42. <?php endif; ?>
  43. <?php if ($error === 'karmabunny\pdb\Exceptions\RowMissingException'): ?>
  44. <p class="helpful-msg">On the live site this message will show as a regular 404 error</p>
  45. <?php endif; ?>
  46. <p class="stats"><?php echo 'Log ID ', $log_id; ?></p>
  47. <?php if ( ! empty($trace)): ?>
  48. <h3><?php echo Kohana::lang('core.stack_trace') ?></h3>
  49. <?php echo $trace ?>
  50. <?php endif ?>
  51. <p class="stats"><?php echo 'Sprout version: ', Sprout::getVersion(); ?></p>
  52. </div>
  53. </body>
  54. </html>
  55.