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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 0125ae546a..599a3689e7 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -1452,8 +1452,8 @@ PHP_FUNCTION(intdiv)
}
if (divisor == 0) {
- php_error_docref(NULL, E_WARNING, "Division by zero");
- RETURN_BOOL(0);
+ zend_throw_exception_ex(NULL, 0, "Division by zero");
+ return;
} else if (divisor == -1 && numerator == ZEND_LONG_MIN) {
/* Prevent overflow error/crash
We don't return a float here as that violates function contract */