felipe Tue, 04 May 2010 18:45:01 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298988
Log:
- Added check for trait when trying to extend it
Changed paths:
U php/php-src/trunk/Zend/zend_compile.c
Modified: php/php-src/trunk/Zend/zend_compile.c
===================================================================
--- php/php-src/trunk/Zend/zend_compile.c 2010-05-04 18:31:40 UTC (rev
298987)
+++ php/php-src/trunk/Zend/zend_compile.c 2010-05-04 18:45:01 UTC (rev
298988)
@@ -3932,6 +3932,8 @@
if (parent_ce->ce_flags & ZEND_ACC_INTERFACE) {
zend_error(E_COMPILE_ERROR, "Class %s cannot extend from
interface %s", ce->name, parent_ce->name);
+ } else if ((parent_ce->ce_flags & ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS) &
ZEND_ACC_TRAIT) {
+ zend_error(E_COMPILE_ERROR, "Class %s cannot extend from trait
%s", ce->name, parent_ce->name);
}
zend_do_inheritance(ce, parent_ce TSRMLS_CC);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php