Made quite a few changes so that the code works in the server
[vanilla-miry.git] / themes / fatal_error.php
blobda76f5e05c910bff4d038a23cfc4d36696ac8f8e
1 <?php
2 // Note: This file is included from the library/Framework/Framework.ErrorManager.class.php
3 // file in the ErrorManager class.
5 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-ca">
7 <head>
8 <title>The page could not be displayed</title>
9 <base href="'.$Context->Configuration['BASE_URL'].'" />
11 if ($this->StyleSheet == '') {
12 echo '<link rel="stylesheet" type="text/css" href="'.$Context->StyleUrl.'utility.css" />';
13 } else {
14 echo '<link rel="stylesheet" href="'.$this->StyleSheet.'" />
17 echo '</head>
18 <body>
19 <div class="PageContainer">
20 <h1>A fatal, non-recoverable error has occurred</h1>
21 <h2>Technical information (for support personel):</h2>';
22 $ErrorCount = count($this->Errors);
23 for ($i = 0; $i < $ErrorCount; $i++) {
24 echo '<dl>
25 <dt>Error Message</dt>
26 <dd>'.ForceString($this->Errors[$i]->Message, 'No error message supplied').'</dd>
27 <dt>Affected Elements</dt>
28 <dd>'.ForceString($this->Errors[$i]->AffectedElement, 'undefined').'.'.ForceString($this->Errors[$i]->AffectedFunction, 'undefined').'();</dd>
29 </dl>';
30 $Code = ForceString($this->Errors[$i]->Code, '');
31 if ($Code != '') {
32 echo '<blockquote>The error occurred on or near:
33 <code>'.$Code.'</code>
34 </blockquote>';
37 if ($Context) {
38 if ($Context->Mode == MODE_DEBUG && $Context->SqlCollector && $Context->SqlCollector->Count() > 0) {
39 echo '<h2>Database queries run prior to error</h2>';
40 $Context->SqlCollector->Write();
43 echo '<p>For additional support documentation, visit the Lussumo Documentation website at: <a href="http://lussumo.com/docs">lussumo.com/docs</a></p>
44 </div>
45 </body>
46 </html>';