Subversion Repositories ALCASAR

Rev

Rev 2770 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2770 Rev 3100
Line 67... Line 67...
67
 * @return void
67
 * @return void
68
 */
68
 */
69
function errorHandlerPsi($level, $message, $file, $line)
69
function errorHandlerPsi($level, $message, $file, $line)
70
{
70
{
71
    $error = PSI_Error::singleton();
71
    $error = PSI_Error::singleton();
72
    if (PSI_DEBUG || (($level !== 2) && ($level !== 8)) || !(preg_match("/^[^:]*: open_basedir /", $message) || preg_match("/^fopen\(/", $message) || preg_match("/^is_readable\(/", $message) || preg_match("/^file_exists\(/", $message) || preg_match("/^fgets\(/", $message))) { // disable open_basedir, fopen, is_readable, file_exists and fgets warnings and notices
72
    if ((PSI_DEBUG && !preg_match("/^fgets\(|^stream_select\(/", $message)) || (($level !== 2) && ($level !== 8)) || !preg_match("/^[^:]*: open_basedir |^fopen\(|^fwrite\(|^is_readable\(|^file_exists\(|^fgets\(|^stream_select\(/", $message)) { // disable open_basedir, fopen, is_readable, file_exists, fgets and stream_select warnings and notices
73
        $error->addPhpError("errorHandlerPsi : ", "Level : ".$level." Message : ".$message." File : ".$file." Line : ".$line);
73
        $error->addPhpError("errorHandlerPsi : ", "Level : ".$level." Message : ".$message." File : ".$file." Line : ".$line);
74
    }
74
    }
75
}
75
}
76
 
76
 
77
set_error_handler('errorHandlerPsi');
77
set_error_handler('errorHandlerPsi');