stop str_repeat from whinging about being run with repeat value of 0. :P
This commit is contained in:
parent
443be8a99c
commit
cc69ede1ee
|
@ -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 = ", ";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user