summaryrefslogtreecommitdiff
path: root/ext/standard/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/math.c')
-rw-r--r--ext/standard/math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 840df9103e..5172bbbd6e 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -129,7 +129,7 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
double tmp_value;
int precision_places;
- if (!zend_finite(value)) {
+ if (!zend_finite(value) || value == 0.0) {
return value;
}