Re: com php-src: Fix bug #67392: token_name() does not return name for T_POW and T_POW_EQUAL token: NEWS ext/tokenizer/tests/bug67395.phpt
ext/tokenizer/tokenizer_data.c

From: Date: Sat, 07 Jun 2014 13:32:18 +0000
Subject: Re: com php-src: Fix bug #67392: token_name() does not return name for T_POW and T_POW_EQUAL token: NEWS ext/tokenizer/tests/bug67395.phpt
ext/tokenizer/tokenizer_data.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78728@lists.php.net to get a copy of this message
duh, I've screwed up the commit message, this fix was for 67395, not 67392 On Sat, Jun 7, 2014 at 3:27 PM, Ferenc Kovacs <tyrael@php.net> wrote: > Commit: 016b1f089e90af2e6a72c78107edce8eb2dcb31f > Author: Ferenc Kovacs <tyrael@php.net> Sat, 7 Jun 2014 > 15:27:54 +0200 > Parents: bcef1beb8f24c8ffc11846d1a123953ca12ed2de > Branches: PHP-5.6 > > Link: > > http://git.php.net/?p=php-src.git;a=commitdiff;h=016b1f089e90af2e6a72c78107edce8eb2dcb31f > > Log: > Fix bug #67392: token_name() does not return name for T_POW and > T_POW_EQUAL token > > Bugs: > https://bugs.php.net/67392 > > Changed paths: > M NEWS > A ext/tokenizer/tests/bug67395.phpt > M ext/tokenizer/tokenizer_data.c > > > Diff: > diff --git a/NEWS b/NEWS > index 3a1290f..a930dd6 100644 > --- a/NEWS > +++ b/NEWS > @@ -7,6 +7,10 @@ PHP > NEWS > (Remi) (CVE-2014-3981) > . Fixed bug #67392 (dtrace breaks argument unpack). (Nikita) > > +- Tokenizer: > + . Fixed bug #67395 (token_name() does not return name for T_POW and > T_POW_EQUAL > + token). (Ferenc) > + > 05 Jun 2014, PHP 5.6.0 Beta 4 > > - Core: > diff --git a/ext/tokenizer/tests/bug67395.phpt > b/ext/tokenizer/tests/bug67395.phpt > new file mode 100644 > index 0000000..c9b7f30 > --- /dev/null > +++ b/ext/tokenizer/tests/bug67395.phpt > @@ -0,0 +1,15 @@ > +--TEST-- > +Bug 67395: token_name() does not return name for T_POW and T_POW_EQUAL > token > +--FILE-- > +<?php > + > +$powToken = token_get_all('<?php **')[1][0]; > +var_dump(token_name($powToken)); > + > +$powEqualToken = token_get_all('<?php **=')[1][0]; > +var_dump(token_name($powEqualToken)); > + > +?> > +--EXPECT-- > +string(5) "T_POW" > +string(11) "T_POW_EQUAL" > diff --git a/ext/tokenizer/tokenizer_data.c > b/ext/tokenizer/tokenizer_data.c > index dc48f04..5a01bde 100644 > --- a/ext/tokenizer/tokenizer_data.c > +++ b/ext/tokenizer/tokenizer_data.c > @@ -160,6 +160,8 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) { > REGISTER_LONG_CONSTANT("T_NS_SEPARATOR", T_NS_SEPARATOR, CONST_CS > | CONST_PERSISTENT); > REGISTER_LONG_CONSTANT("T_ELLIPSIS", T_ELLIPSIS, CONST_CS | > CONST_PERSISTENT); > REGISTER_LONG_CONSTANT("T_DOUBLE_COLON", T_PAAMAYIM_NEKUDOTAYIM, > CONST_CS | CONST_PERSISTENT); > + REGISTER_LONG_CONSTANT("T_POW", T_POW, CONST_CS | > CONST_PERSISTENT); > + REGISTER_LONG_CONSTANT("T_POW_EQUAL", T_POW_EQUAL, CONST_CS | > CONST_PERSISTENT); > } > > char *get_token_type_name(int token_type) > @@ -296,6 +298,8 @@ char *get_token_type_name(int token_type) > case T_DIR: return "T_DIR"; > case T_NS_SEPARATOR: return "T_NS_SEPARATOR"; > case T_ELLIPSIS: return "T_ELLIPSIS"; > + case T_POW: return "T_POW"; > + case T_POW_EQUAL: return "T_POW_EQUAL"; > > } > return "UNKNOWN"; > > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.cvs (#78728) next »