diff options
author | Nikita Popov <nikic@php.net> | 2014-06-26 14:00:20 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-06-26 14:00:20 +0200 |
commit | 31687ed5c7bc53fdecdc14d2457ab2c69d444014 (patch) | |
tree | 356688eecccf441d1cafeb2638f4db9e490fbd1c /Zend/zend_language_scanner.l | |
parent | 7f01b6fcec81a0b9f418d837943b194e1414c62c (diff) | |
download | php-git-31687ed5c7bc53fdecdc14d2457ab2c69d444014.tar.gz |
Handle trait __CLASS__ in parser
Diffstat (limited to 'Zend/zend_language_scanner.l')
-rw-r--r-- | Zend/zend_language_scanner.l | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index b5100860c1..d0ef6307ff 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1597,10 +1597,8 @@ NEWLINE ("\r"|"\n"|"\r\n") <ST_IN_SCRIPTING>"__CLASS__" { zend_class_entry *ce = CG(active_class_entry); if (ce && ZEND_ACC_TRAIT == (ce->ce_flags & ZEND_ACC_TRAIT)) { - /* We create a special __CLASS__ constant that is going to be resolved - at run-time */ - ZVAL_STRINGL(zendlval, "__CLASS__", sizeof("__CLASS__") - 1); - Z_TYPE_INFO_P(zendlval) = IS_CONSTANT_EX; + /* Signal that the __CLASS__ needs to be resolved at runtime */ + ZVAL_UNDEF(zendlval); } else { if (ce && ce->name) { ZVAL_STR(zendlval, STR_COPY(ce->name)); |