com php-src: Prevent possible double inheritance (ext/opcache/tests/bug67215.phpt): Zend/zend_compile.c
| From: | Dmitry Stogov | Date: | Tue, 10 Mar 2015 15:50:07 +0000 |
| Subject: | com php-src: Prevent possible double inheritance (ext/opcache/tests/bug67215.phpt): Zend/zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85442@lists.php.net to get a copy of this message | ||
Commit: a53d82daa6d8de6e020a656b9b275a0b5dbcde4c
Author: Dmitry Stogov <dmitry@zend.com> Tue, 10 Mar 2015 18:50:07 +0300
Parents: 61406a527f42a960e248e01070bb90419a71f2df
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a53d82daa6d8de6e020a656b9b275a0b5dbcde4c
Log:
Prevent possible double inheritance (ext/opcache/tests/bug67215.phpt)
Bugs:
https://bugs.php.net/67215
Changed paths:
M Zend/zend_compile.c
Diff:
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 2a428fc..f2de2c7 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -975,6 +975,10 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array
*op_array
return NULL;
}
+ if (zend_hash_exists(class_table, Z_STR_P(op2))) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Cannot redeclare class %s", ce->name->val);
+ }
+
zend_do_inheritance(ce, parent_ce);
ce->refcount++;