Changeset 247 for trunk/lib/App.inc.php
- Timestamp:
- Apr 5, 2007 1:48:45 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r242 r247 533 533 'date' => date('Y-m-d H:i:s'), 534 534 'remote ip' => getRemoteAddr(), 535 'pid' => ( substr(PHP_OS, 0, 3) != 'WIN' ? posix_getpid() : ''),535 'pid' => (mb_substr(PHP_OS, 0, 3) != 'WIN' ? posix_getpid() : ''), 536 536 'type' => $this->logPriorityToString($priority), 537 537 'file:line' => "$file : $line", 538 'url' => substr(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '', 0, 128),538 'url' => mb_substr(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '', 0, 128), 539 539 'message' => $message 540 540 ); … … 543 543 if ($this->getParam('log_file_priority') && $priority <= $this->getParam('log_file_priority')) { 544 544 $event_str = '[' . join('] [', $event) . ']'; 545 error_log( substr($event_str, 0, 1024) . "\n", 3, $this->getParam('log_directory') . '/' . $this->getParam('log_filename'));545 error_log(mb_substr($event_str, 0, 1024) . "\n", 3, $this->getParam('log_directory') . '/' . $this->getParam('log_filename')); 546 546 } 547 547 … … 554 554 $email_msg .= sprintf("%-11s%s\n", $k, $v); 555 555 } 556 m ail($this->getParam('log_to_email_address'), $subject, $email_msg, $headers, '-f codebase@strangecode.com');556 mb_send_mail($this->getParam('log_to_email_address'), $subject, $email_msg, $headers, '-f codebase@strangecode.com'); 557 557 } 558 558 … … 560 560 if ($this->getParam('log_sms_priority') && $priority <= $this->getParam('log_sms_priority')) { 561 561 $subject = sprintf('[%s %s]', getenv('HTTP_HOST'), $priority); 562 $sms_msg = sprintf('%s [%s:%s]', substr($event['message'], 0, 64), basename($file), $line);562 $sms_msg = sprintf('%s [%s:%s]', mb_substr($event['message'], 0, 64), basename($file), $line); 563 563 $headers = "From: codebase@strangecode.com"; 564 m ail($this->getParam('log_to_sms_address'), $subject, $sms_msg, $headers, '-f codebase@strangecode.com');564 mb_send_mail($this->getParam('log_to_sms_address'), $subject, $sms_msg, $headers, '-f codebase@strangecode.com'); 565 565 } 566 566 … … 669 669 670 670 // Get the first delimiter that is needed in the url. 671 $delim = strpos($url, '?') !== false ? ini_get('arg_separator.output') : '?';671 $delim = mb_strpos($url, '?') !== false ? ini_get('arg_separator.output') : '?'; 672 672 673 673 $q = '';
Note: See TracChangeset
for help on using the changeset viewer.