summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-11-26 13:53:48 +0100
committerNikita Popov <nikita.ppv@gmail.com>2018-11-26 13:57:17 +0100
commite7131a4e9fa0acf8fc1e486b49851e71859ef5b8 (patch)
tree7ef08bc96e8e102b4e08f0e13bd615ad8fb444a7 /Zend/zend_exceptions.c
parent28edeb2ba3551fc6cff2db0004d67435467cdaac (diff)
downloadphp-git-e7131a4e9fa0acf8fc1e486b49851e71859ef5b8.tar.gz
Remove redundant Exception::__clone() method
Exceptions already prohibit cloning by setting clone_obj to NULL (which is integrated with reflection). No need to additionally define a dummy __clone() method.
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 8330aba632..848e15b855 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -251,15 +251,6 @@ static zend_object *zend_error_exception_new(zend_class_entry *class_type) /* {{
}
/* }}} */
-/* {{{ proto Exception|Error Exception|Error::__clone()
- Clone the exception object */
-ZEND_COLD ZEND_METHOD(exception, __clone)
-{
- /* Should never be executable */
- zend_throw_exception(NULL, "Cannot clone object using __clone()", 0);
-}
-/* }}} */
-
/* {{{ proto Exception|Error::__construct(string message, int code [, Throwable previous])
Exception constructor */
ZEND_METHOD(exception, __construct)
@@ -772,7 +763,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_exception___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
static const zend_function_entry default_exception_functions[] = {
- ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
ZEND_ME(exception, __wakeup, NULL, ZEND_ACC_PUBLIC)
ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)