summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-07-02 01:54:08 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-07-02 02:20:58 +0200
commit007d7ac7ca6d52ba5e7a0ba7b2c582a04ddc50df (patch)
tree1a3615bd2fb103b7a0e9703fd869891613a57510 /Zend/zend_exceptions.c
parentf9724b93f6592d2f77fa9165038a0ba0db3da0c6 (diff)
downloadphp-git-007d7ac7ca6d52ba5e7a0ba7b2c582a04ddc50df.tar.gz
Use DivisionByZeroError instead of exception for %/intdiv()
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index b0547b07a9..9f5b2448d1 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -31,6 +31,7 @@
#include "zend_smart_str.h"
ZEND_API zend_class_entry *zend_ce_throwable;
+ZEND_API zend_class_entry *zend_ce_division_by_zero_error;
static zend_class_entry *default_exception_ce;
static zend_class_entry *error_exception_ce;
@@ -853,6 +854,10 @@ void zend_register_default_exception(void) /* {{{ */
INIT_CLASS_ENTRY(ce, "TypeError", NULL);
type_error_ce = zend_register_internal_class_ex(&ce, error_ce);
type_error_ce->create_object = zend_default_exception_new;
+
+ INIT_CLASS_ENTRY(ce, "DivisionByZeroError", NULL);
+ zend_ce_division_by_zero_error = zend_register_internal_class_ex(&ce, error_ce);
+ zend_ce_division_by_zero_error->create_object = zend_default_exception_new;
}
/* }}} */