cvs: ZendEngine2 / zend_reflection_api.c
| From: | Marcus Boerger | Date: | Thu, 23 Sep 2004 18:37:54 +0000 |
| Subject: | cvs: ZendEngine2 / zend_reflection_api.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3015@lists.php.net to get a copy of this message | ||
helly Thu Sep 23 14:37:54 2004 EDT
Modified files:
/ZendEngine2 zend_reflection_api.c
Log:
Bugfix # 30209
http://cvs.php.net/diff.php/ZendEngine2/zend_reflection_api.c?r1=1.125&r2=1.126&ty=u
Index: ZendEngine2/zend_reflection_api.c
diff -u ZendEngine2/zend_reflection_api.c:1.125 ZendEngine2/zend_reflection_api.c:1.126
--- ZendEngine2/zend_reflection_api.c:1.125 Sun Sep 19 07:54:08 2004
+++ ZendEngine2/zend_reflection_api.c Thu Sep 23 14:37:53 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_reflection_api.c,v 1.125 2004/09/19 11:54:08 helly Exp $ */
+/* $Id: zend_reflection_api.c,v 1.126 2004/09/23 18:37:53 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
#include "zend_exceptions.h"
@@ -2315,7 +2315,7 @@
reflection_object *intern;
zend_class_entry *ce;
zend_function *mptr;
- char *name;
+ char *name, *lc_name;
int name_len;
METHOD_NOTSTATIC;
@@ -2324,10 +2324,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;