stop str_repeat from whinging about being run with repeat value of 0. :P

This commit is contained in:
Brion Vibber 2010-10-07 17:01:14 -07:00
parent 443be8a99c
commit cc69ede1ee

View File

@ -32,10 +32,10 @@ function indentOptions($indent)
{ {
$cutoff = 3; $cutoff = 3;
if ($indent < $cutoff) { if ($indent < $cutoff) {
$space = str_repeat(' ', $indent * 4); $space = $indent ? str_repeat(' ', $indent * 4) : '';
$sep = ","; $sep = ",";
$lf = "\n"; $lf = "\n";
$endspace = "$lf" . str_repeat(' ', ($indent - 1) * 4); $endspace = "$lf" . ($indent ? str_repeat(' ', ($indent - 1) * 4) : '');
} else { } else {
$space = ''; $space = '';
$sep = ", "; $sep = ", ";