Voting

: zero plus six?
(Example: nine)

The Note You're Voting On

http://synergy8.com
19 years ago
It should be noted that if an internal php function such as call_user_func in the backtrace, the 'file' and 'line' entries will not be set.

Most debug tracers will use these entries. You should place a check to see if the key exists in the array before using this function. Otherwise notices will be generated.

<?php

$arrTrace
= debug_backtrace();

foreach (
$arrTrace as $arr)
{
if (!isset (
$arr['file']))
{
$arr['file'] = '[PHP Kernel]';
}

if (!isset (
$arr['line']))
{
$arr['line'] = '';
}

// Do something
}

?>

<< Back to user notes page

To Top