From cc69ede1eeeb6c122b820367b07a56395a481557 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 7 Oct 2010 17:01:14 -0700 Subject: stop str_repeat from whinging about being run with repeat value of 0. :P --- scripts/dumpschema.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/dumpschema.php b/scripts/dumpschema.php index 818a4d5ea..20812fe5b 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 = ", "; -- cgit v1.2.3-54-g00ecf