~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to lib/eventum/class.error_handler.php

  • Committer: Elan Ruusamäe
  • Date: 2009-06-27 15:00:41 UTC
  • Revision ID: glen@delfi.ee-20090627150041-mpb27al56kmprakw
- restructured

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
 
99
99
        // this checks that we're not running from commandline (cron for example)
100
100
        if (isset($_SERVER['REMOTE_ADDR'])) {
101
 
            $msg .= "That happened on page '" . $_SERVER['SCRIPT_NAME'] . "' from IP Address '" . $_SERVER['REMOTE_ADDR'] . "' coming from the page (referrer) '" . $_SERVER['HTTP_REFERER'] . "'.\n\n";
102
 
            $msg .= "The user agent given was '" . $_SERVER['HTTP_USER_AGENT'] . "'.\n\n";
 
101
            $msg .= "That happened on page '" . $_SERVER['SCRIPT_NAME'] . "' from IP Address '" . $_SERVER['REMOTE_ADDR'];
 
102
            if (!empty($_SERVER['HTTP_REFERER'])) {
 
103
                $msg  .= "' coming from the page (referrer) '" . $_SERVER['HTTP_REFERER'] . "'";
 
104
            }
 
105
            $msg .= ".\n\nThe user agent given was '" . $_SERVER['HTTP_USER_AGENT'] . "'.\n\n";
103
106
        }
104
107
        $msg .= "-- \nSincerely yours,\nAutomated Error_Handler Class";
105
108
 
152
155
        foreach ($backtrace as $e) {
153
156
            // backtrace frame contains: [file] [line] [function] [class] [type] [args]
154
157
            $f = $e['file'];
155
 
            $f = str_replace(APP_INC_PATH, 'APP_INC_PATH/', $f);
156
 
            $f = str_replace(APP_PATH, 'APP_PATH/', $f);
 
158
            $f = str_replace(APP_INC_PATH, 'APP_INC_PATH', $f);
 
159
            $f = str_replace(APP_PATH, 'APP_PATH', $f);
157
160
 
158
161
            $fn = $e['function'];
159
162
            if (isset($e['class'])) {