[interchange: 1/2] Keep logic of 'defined' for commify filter, so [filter commify.0] works.

Josh Lavin <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit b4be8c300dc210e4888c3e8592c46c356a03123d
Author: Josh Lavin <[email protected]>
Date:   Tue Feb 19 14:11:09 2013 -0800

    Keep logic of 'defined' for commify filter, so [filter commify.0] works.

 code/Filter/commify.filter |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/code/Filter/commify.filter b/code/Filter/commify.filter
index 0f561bc..521172f 100644
--- a/code/Filter/commify.filter
+++ b/code/Filter/commify.filter
@@ -5,8 +5,6 @@
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.  See the LICENSE file for details.
-# 
-# $Id: commify.filter,v 1.4 2007-03-30 23:40:44 pajamian Exp $
 
 CodeDef commify Filter
 CodeDef commify Description Commify
@@ -14,7 +12,7 @@ CodeDef commify Routine <<EOR
 sub {
 	my ($val, $tag, $places) = @_;
 	$places = 2 unless defined $places;
-	$val = sprintf("%.${places}f", $val) if $places;
+	$val = sprintf("%.${places}f", $val) if defined $places;
 	return Vend::Util::commify($val);
 }
 EOR
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.