Changeset 21429


Ignore:
Timestamp:
2012/02/01 22:10:26 (9 years ago)
Author:
Seasoft
Message:

#1618 (handle_error のログの書き出し処理で警告)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/html/handle_error.php

    r21420 r21429  
    9494 
    9595    $now = date("Y/m/d H:i:s"); 
     96    // 本来 realpath() で正規化したいところだが、NULL を返すケースがあるため避けている (#1618) 
     97    $log_file_path = dirname(__FILE__) . '/' . HTML2DATA_DIR . 'logs/site.log'; 
    9698    switch ($errno) { 
    9799        case E_USER_ERROR: 
    98             error_log($now . " [$errfile] FATAL Error($errno) $errfile:$errline $errstr from ". $_SERVER['REMOTE_ADDR'] . "\n", 3, realpath(dirname(__FILE__) . "/" . HTML2DATA_DIR . "logs/site.log")); 
     100            error_log($now . " [$errfile] FATAL Error($errno) $errfile:$errline $errstr from ". $_SERVER['REMOTE_ADDR'] . "\n", 3, $log_file_path); 
    99101 
    100102            displaySystemError($errstr); 
     
    104106        case E_WARNING: 
    105107        case E_USER_WARNING: 
    106             error_log($now . " [$errfile] WARNING($errno) $errfile:$errline $errstr from ". $_SERVER['REMOTE_ADDR'] . "\n", 3, realpath(dirname(__FILE__) . "/" . HTML2DATA_DIR . "logs/site.log")); 
     108            error_log($now . " [$errfile] WARNING($errno) $errfile:$errline $errstr from ". $_SERVER['REMOTE_ADDR'] . "\n", 3, $log_file_path); 
    107109            return true; 
    108110            break; 
Note: See TracChangeset for help on using the changeset viewer.