cvs: ZendEngine2(PHP_5_0) / zend_reflection_api.c
| From: | Marcus Boerger | Date: | Thu, 23 Sep 2004 18:41:15 +0000 |
| Subject: | cvs: ZendEngine2(PHP_5_0) / zend_reflection_api.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3016@lists.php.net to get a copy of this message | ||
helly Thu Sep 23 14:41:15 2004 EDT
Modified files: (Branch: PHP_5_0)
/ZendEngine2 zend_reflection_api.c
Log:
MFH Bugfix # 30209
http://cvs.php.net/diff.php/ZendEngine2/zend_reflection_api.c?r1=1.111.2.4&r2=1.111.2.5&ty=u
Index: ZendEngine2/zend_reflection_api.c
diff -u ZendEngine2/zend_reflection_api.c:1.111.2.4 ZendEngine2/zend_reflection_api.c:1.111.2.5
--- ZendEngine2/zend_reflection_api.c:1.111.2.4 Mon Aug 23 09:14:27 2004
+++ ZendEngine2/zend_reflection_api.c Thu Sep 23 14:41:15 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_reflection_api.c,v 1.111.2.4 2004/08/23 13:14:27 zeev Exp $ */
+/* $Id: zend_reflection_api.c,v 1.111.2.5 2004/09/23 18:41:15 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
#include "zend_exceptions.h"
@@ -2159,7 +2159,7 @@
reflection_object *intern;
zend_class_entry *ce;
zend_function *mptr;
- char *name;
+ char *name, *lc_name;
int name_len;
METHOD_NOTSTATIC;
@@ -2168,10 +2168,12 @@
}
GET_REFLECTION_OBJECT_PTR(ce);
- zend_str_tolower(name, name_len);
- if (zend_hash_find(&ce->function_table, name, name_len + 1, (void**) &mptr) == SUCCESS)
{
+ lc_name = zend_str_tolower_dup(name, name_len);
+ if (zend_hash_find(&ce->function_table, lc_name, name_len + 1, (void**) &mptr) ==
SUCCESS) {
reflection_method_factory(ce, mptr, return_value TSRMLS_CC);
+ efree(lc_name);
} else {
+ efree(lc_name);
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
"Method %s does not exist", name);
return;