Skip to content

Commit 808275b

Browse files
committed
fix trimChars recursion bug
1 parent c9beef8 commit 808275b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/SugarLogger/SugarLogger.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ private function extendedPrintR($data, $maxLevel = 5, $eol = PHP_EOL, $trimChars
224224
$print .= $eol.($eol==PHP_EOL? " {$spaces}" : '')."[{$key}] => ";
225225
if (strlen($print) < $trimChars) {
226226
$print .= in_array(gettype($element), array('object', 'array')) ?
227-
$this->extendedPrintR($element, $maxLevel, $eol, $currLevel + 1, $numSpaces + 2) :
227+
$this->extendedPrintR($element, $maxLevel, $eol, $trimChars, $currLevel + 1, $numSpaces + 2) :
228228
(is_string($element) ? ("'" . $element . "'") : $element);
229229
} else {
230-
return $print; // excess chars, finish everything early
230+
return ($print . ''); // excess chars, finish everything early
231231
}
232232
}
233233
} else {

0 commit comments

Comments
 (0)