com php-src: Merge branch 'PHP-5.5' into PHP-5.6: Zend/zend_c ompile.c

From: Date: Fri, 28 Nov 2014 12:26:53 +0000
Subject: com php-src: Merge branch 'PHP-5.5' into PHP-5.6: Zend/zend_c ompile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-83372@lists.php.net to get a copy of this message
Commit: b248a7a95c00de3e47b2d589d75d719a8fc70dfb Author: Julien Pauli <jpauli@php.net> Fri, 28 Nov 2014 13:26:53 +0100 Parents: 1552d6ae7bb2b2f13a268b035b2fcb83a7c2a0df 619adc9795f925531196c5b7e4797453130eac98 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b248a7a95c00de3e47b2d589d75d719a8fc70dfb Log: Merge branch 'PHP-5.5' into PHP-5.6 * PHP-5.5: updated NEWS Fix #65419 - Inside trait, self::class != __CLASS__ Bugs: https://bugs.php.net/65419 Changed paths: MM Zend/zend_compile.c Diff: diff --cc Zend/zend_compile.c index ccaf165,ae9409e..0314909 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@@ -2212,8 -2138,14 +2212,14 @@@ void zend_do_resolve_class_name(znode * switch (lctype) { case ZEND_FETCH_CLASS_SELF: if (!CG(active_class_entry)) { - zend_error(E_COMPILE_ERROR, "Cannot access self::class when no class scope is active"); + zend_error_noreturn(E_COMPILE_ERROR, "Cannot access self::class when no class scope is active"); } + if (CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT) { + constant_name.op_type = IS_CONST; + ZVAL_STRINGL(&constant_name.u.constant, "class", sizeof("class")-1, 1); + zend_do_fetch_constant(result, class_name, &constant_name, ZEND_RT, 1 TSRMLS_CC); + break; + } zval_dtor(&class_name->u.constant); class_name->op_type = IS_CONST; ZVAL_STRINGL(&class_name->u.constant, CG(active_class_entry)->name, CG(active_class_entry)->name_length, 1);

« previous php.cvs (#83372) next »