cvs: ZendEngine2(PHP_5_2) / zend_builtin_functions.c /tests bug48693.phpt php-src NEWS
felipe Sun Jun 28 01:16:37 2009 UTC
Added files: (Branch: PHP_5_2)
/ZendEngine2/tests bug48693.phpt
Modified files:
/php-src NEWS
/ZendEngine2 zend_builtin_functions.c
Log:
- MFH: Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1569&r2=1.2027.2.547.2.1570&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1569 php-src/NEWS:1.2027.2.547.2.1570
--- php-src/NEWS:1.2027.2.547.2.1569 Wed Jun 24 12:21:19 2009
+++ php-src/NEWS Sun Jun 28 01:16:36 2009
@@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2009, PHP 5.2.11
+- Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly
+ formatted). (peter at lvp-media dot com, Felipe)
- Fixed bug #48661 (phpize is broken with non-bash shells). (Jani)
- Fixed bug #48636 (Error compiling of ext/date on netware). (guenter at
php.net, Ilia)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.41&r2=1.277.2.12.2.42&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.41
ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.42
--- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.41 Mon Jun 22 00:03:24 2009
+++ ZendEngine2/zend_builtin_functions.c Sun Jun 28 01:16:36 2009
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.41 2009/06/22 00:03:24 felipe Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.42 2009/06/28 01:16:36 felipe Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -1516,6 +1516,7 @@
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);
} else {
+ zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_FALSE;
}
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug48693.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug48693.phpt
+++ ZendEngine2/tests/bug48693.phpt
--TEST--
Bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted)
--FILE--
<?php
$x = create_function('', 'return 1; }');
$y = create_function('', 'function a() { }; return 2;');
$z = create_function('', '{');
$w = create_function('', 'return 3;');
var_dump(
$x,
$y(),
$z,
$w(),
$y != $z
);
?>
--EXPECTF--
Parse error: syntax error, unexpected '}' in %s(%d) : runtime-created function on line 1
Parse error: syntax error, unexpected $end in %s(%d) : runtime-created function on line 1
bool(false)
int(2)
bool(false)
int(3)
bool(true)
Thread (1 message)
- Felipe Pena