if (!is_array($debug)) {
$info .= $debug.", ";
} // END - if
- } // END - if
+ } // END - foreach
+ // Remove last chars (commata, space)
$info = substr($info, 0, -2);
} // END - if
// The message
$dbgMsg .= "\t at <em id=\"debug_id_".$dbgIndex."\">".$dbgIndex."</em> <em id=\"debug_file_".$dbgIndex."\">".$file."</em> (<em id=\"debug_line_".$dbgIndex."\">".$line."</em>) -> ".$dbgInfo['function']."(".$info.")<br />\n";
} // END - if
+
+ // Add end-message
$dbgMsg .= "Debug backtrace end<br />\n";
+ // Return full debug message
return $dbgMsg;
}