[
https://issues.apache.org/jira/browse/LOG4PHP-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13554823#comment-13554823
]
Dmitriy Ulyanov commented on LOG4PHP-205:
-----------------------------------------
Simple example: (see returned trace array)
<?php
$array = array('a', 'b', 'c');
set_error_handler('myErrorHandler');
usort($array, 'mysort');
function mysort($a, $b)
{
trigger_error('some error');
exit;
}
function myErrorHandler()
{
$trace = debug_backtrace();
print_r($trace);
}
> debug_backtrace() sometimes do not return 'file' and 'line' values
> ------------------------------------------------------------------
>
> Key: LOG4PHP-205
> URL: https://issues.apache.org/jira/browse/LOG4PHP-205
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Affects Versions: 2.3.0
> Reporter: Dmitriy Ulyanov
> Priority: Critical
>
> debug_backtrace() sometimes do not return 'file' and 'line' values.
> This results in an error (Notice).
> Please, add "isset" in code: LoggerLoggingEvent.php, lines: 172-173
> .....
> $locationInfo['line'] = $hop['line'];
> $locationInfo['file'] = $hop['file'];
> .....
> Thank you!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira