I have following code to backtrace the error ....but its
$traces = debug_backtrace();
foreach ($traces as $k => $v)
{
if ($v[\'function\'] == \'include\
$trace = debug_backtrace();
foreach($traces as ...)
There's something wrong here. $trace is a Debug Backtrace array. While you foreach($traces) ... which seems undefined. And you append to $traces which is supposed to be a non-scalar to foreach it.
Just name your variables properly and make names different!