From: Brion Vibber Date: Fri, 8 Oct 2010 00:01:14 +0000 (-0700) Subject: stop str_repeat from whinging about being run with repeat value of 0. :P X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cc69ede1eeeb6c122b820367b07a56395a481557;p=quix0rs-gnu-social.git stop str_repeat from whinging about being run with repeat value of 0. :P --- diff --git a/scripts/dumpschema.php b/scripts/dumpschema.php index 818a4d5eae..20812fe5b8 100644 --- a/scripts/dumpschema.php +++ b/scripts/dumpschema.php @@ -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 = ", ";