Esempio n. 1
0
function parser_warning($message)
{
    global $tokens, $i;
    list($pos, $line, $full_line) = pos_to_line_details($i);
    warn_error('PARSER', $pos, $line, $message);
}
Esempio n. 2
0
function log_warning($warning, $i = -1, $absolute = false)
{
    global $TEXT, $FILENAME, $START_TIME, $myfile_WARNINGS;
    if ($i == -1 && isset($GLOBALS['i'])) {
        $i = $GLOBALS['i'];
    }
    list($pos, $line, $full_line) = pos_to_line_details($i, $absolute);
    echo 'WARNING "' . $FILENAME . '" ' . $line . ' ' . $pos . ' ' . 'PHP: ' . $warning . cnl();
    //	if (!isset($myfile_WARNINGS)) $myfile_WARNINGS=fopen('warnings_'.$START_TIME.'.log','at');
    //	fwrite($myfile_WARNINGS,$FILENAME.': '.$warning.' (at line '.$line.', position '.$pos.')  ['.$full_line.']'."\n");
    //fclose($myfile_WARNINGS);
}