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
1 changed files with 2 additions and 2 deletions

View File

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