From 0b558c6eb0affa6196f03f31221361538181df07 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Tue, 22 Dec 2009 19:12:11 -0500 Subject: [PATCH] Adding code to make tests from previous commit pass. --- cake/libs/view/helpers/number.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cake/libs/view/helpers/number.php b/cake/libs/view/helpers/number.php index 6503c234e..fec893b0f 100644 --- a/cake/libs/view/helpers/number.php +++ b/cake/libs/view/helpers/number.php @@ -177,10 +177,12 @@ class NumberHelper extends AppHelper { } $options['after'] = null; } elseif ($number < 1 && $number > -1 ) { - $multiply = intval('1' . str_pad('', $options['places'], '0')); - $number = $number * $multiply; - $options['before'] = null; - $options['places'] = null; + if ($options['after'] !== false) { + $multiply = intval('1' . str_pad('', $options['places'], '0')); + $number = $number * $multiply; + $options['before'] = null; + $options['places'] = null; + } } elseif (empty($options['before'])) { $options['before'] = null; } else {