fix syntax error with corrupt data
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 3 Aug 2008 03:14:23 +0000 (23:14 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 3 Aug 2008 03:14:23 +0000 (23:14 -0400)
Just because it's supposed to be an integer or boolean doesn't mean the
vlaue really is..

IkiWiki/Setup/Standard.pm

index 0e640f8ac85b4b1ae9b21df12b9a574090785f94..dd613fd035d3fc57267497e9840deecad59bebc0 100644 (file)
@@ -28,7 +28,7 @@ sub dumpline ($$$$) { #{{{
        local $Data::Dumper::Quotekeys=0;
        
        my $dumpedvalue;
-       if ($type eq 'boolean' || $type eq 'integer') {
+       if (($type eq 'boolean' || $type eq 'integer') && $value=~/^[0-9]+$/) {
                # avoid quotes
                $dumpedvalue=$value;
        }