// Init argument string
$argsString = '';
- // Convert arguments type into human-readable
- foreach ($traceArray['args'] as $arg) {
- $argsString .= ', ' . gettype($arg);
- } // END - foreach
- $argsString = substr($argsString, 2);
+ // Any arguments?
+ if ((isset($traceArray['args'])) && (is_array($traceArray['args'])) && (count($traceArray['args']) > 0)) {
+ // Convert arguments type into human-readable
+ foreach ($traceArray['args'] as $arg) {
+ $argsString .= ', ' . gettype($arg);
+ } // END - foreach
+ $argsString = substr($argsString, 2);
+ } // END - if
// Set missing file/line
if (!isset($traceArray['file'])) $traceArray['file'] = 'unknown';