svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug54013.phpt branches/PHP_5_3/Zend/zend_compile.c trunk/Zend/tests/bug54013.phpt
| From: | Felipe Pena | Date: | Thu, 17 Feb 2011 23:24:50 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/Zend/tests/bug54013.phpt branches/PHP_5_3/Zend/zend_compile.c trunk/Zend/tests/bug54013.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-64568@lists.php.net to get a copy of this message | ||
felipe Thu, 17 Feb 2011 23:24:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=308443
Log:
- Fixed bug #43512 (same parameter name can be used multiple times in method/function definition)
Bug: http://bugs.php.net/43512 (Open) same parameter name
can be used multiple times in method/function definition
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
A php/php-src/branches/PHP_5_3/Zend/tests/bug54013.phpt
U php/php-src/branches/PHP_5_3/Zend/zend_compile.c
A php/php-src/trunk/Zend/tests/bug54013.phpt
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2011-02-17 22:05:01 UTC (rev 308442)
+++ php/php-src/branches/PHP_5_3/NEWS 2011-02-17 23:24:50 UTC (rev 308443)
@@ -1,6 +1,9 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2011, PHP 5.3.6
+- Zend Engine:
+ . Fixed bug #43512 (same parameter name can be used multiple times in
+ method/function definition). (Felipe)
17 Feb 2011, PHP 5.3.6RC1
- Upgraded bundled Sqlite3 to version 3.7.4. (Ilia)
Added: php/php-src/branches/PHP_5_3/Zend/tests/bug54013.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/tests/bug54013.phpt (rev 0)
+++ php/php-src/branches/PHP_5_3/Zend/tests/bug54013.phpt 2011-02-17 23:24:50 UTC (rev 308443)
@@ -0,0 +1,31 @@
+--TEST--
+Bug #54013 (ReflectionParam for duplicate parameter contains garbage)
+--FILE--
+<?php
+
+class a
+{
+ function b($aaaaaaaa, $aaaaaaaa)
+ {
+ $params = func_get_args();
+ }
+}
+
+$c = new a;
+$c->b('waa?', 'meukee!');
+
+$reflectionClass = new ReflectionClass($c);
+$params = $reflectionClass->getMethod('b')->getParameters();
+
+var_dump($params[0], $params[1]);
+
+?>
+--EXPECTF--
+object(ReflectionParameter)#%d (1) {
+ ["name"]=>
+ string(8) "aaaaaaaa"
+}
+object(ReflectionParameter)#%d (1) {
+ ["name"]=>
+ string(8) "aaaaaaaa"
+}
Property changes on: php/php-src/branches/PHP_5_3/Zend/tests/bug54013.phpt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision
Added: svn:eol-style
+ native
Modified: php/php-src/branches/PHP_5_3/Zend/zend_compile.c
===================================================================
--- php/php-src/branches/PHP_5_3/Zend/zend_compile.c 2011-02-17 22:05:01 UTC (rev 308442)
+++ php/php-src/branches/PHP_5_3/Zend/zend_compile.c 2011-02-17 23:24:50 UTC (rev 308443)
@@ -387,6 +387,7 @@
result->op_type = IS_CV;
result->u.var = lookup_cv(CG(active_op_array), varname->u.constant.value.str.val,
varname->u.constant.value.str.len);
result->u.EA.type = 0;
+ varname->u.constant.value.str.val = CG(active_op_array)->vars[result->u.var].name;
return;
}
}
Added: php/php-src/trunk/Zend/tests/bug54013.phpt
===================================================================
--- php/php-src/trunk/Zend/tests/bug54013.phpt (rev 0)
+++ php/php-src/trunk/Zend/tests/bug54013.phpt 2011-02-17 23:24:50 UTC (rev 308443)
@@ -0,0 +1,31 @@
+--TEST--
+Bug #54013 (ReflectionParam for duplicate parameter contains garbage)
+--FILE--
+<?php
+
+class a
+{
+ function b($aaaaaaaa, $aaaaaaaa)
+ {
+ $params = func_get_args();
+ }
+}
+
+$c = new a;
+$c->b('waa?', 'meukee!');
+
+$reflectionClass = new ReflectionClass($c);
+$params = $reflectionClass->getMethod('b')->getParameters();
+
+var_dump($params[0], $params[1]);
+
+?>
+--EXPECTF--
+object(ReflectionParameter)#%d (1) {
+ ["name"]=>
+ string(8) "aaaaaaaa"
+}
+object(ReflectionParameter)#%d (1) {
+ ["name"]=>
+ string(8) "aaaaaaaa"
+}
Property changes on: php/php-src/trunk/Zend/tests/bug54013.phpt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision
Added: svn:eol-style
+ native