[prev in list] [next in list] [prev in thread] [next in thread]
List: pecl-cvs
Subject: [PECL-CVS] cvs: pecl /pdo pdo_stmt.c
From: "Marcus Boerger" <helly () php ! net>
Date: 2005-10-29 11:10:36
Message-ID: cvshelly1130584236 () cvsserver
[Download RAW message or body]
helly Sat Oct 29 07:10:36 2005 EDT
Modified files:
/pecl/pdo pdo_stmt.c
Log:
- Fix PECL Bug #5772; FETCH_FUNC broken for mixed case function names
# Mhhh, now wez and me did it in different branches only because i forgot
# to commit and MFH too
http://cvs.php.net/diff.php/pecl/pdo/pdo_stmt.c?r1=1.128&r2=1.129&ty=u
Index: pecl/pdo/pdo_stmt.c
diff -u pecl/pdo/pdo_stmt.c:1.128 pecl/pdo/pdo_stmt.c:1.129
--- pecl/pdo/pdo_stmt.c:1.128 Mon Oct 10 10:43:51 2005
+++ pecl/pdo/pdo_stmt.c Sat Oct 29 07:10:34 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdo_stmt.c,v 1.128 2005/10/10 14:43:51 iliaa Exp $ */
+/* $Id: pdo_stmt.c,v 1.129 2005/10/29 11:10:34 helly Exp $ */
/* The PDO Statement Handle Class */
@@ -637,6 +637,8 @@
zval **object = NULL, **method;
zend_class_entry * ce = NULL, **pce;
zend_function *function_handler;
+ char *lcname;
+ unsigned int lcname_len;
if (Z_TYPE_P(callable) == IS_ARRAY) {
if (Z_ARRVAL_P(callable)->nNumOfElements < 2) {
@@ -674,11 +676,15 @@
return 0;
}
+ lcname = zend_u_str_case_fold(Z_TYPE_PP(method), Z_UNIVAL_PP(method), \
Z_UNILEN_PP(method), 1, &lcname_len); +
fci->function_table = ce ? &ce->function_table : EG(function_table);
- if (zend_u_hash_find(fci->function_table, Z_TYPE_PP(method), Z_UNIVAL_PP(method), \
Z_UNILEN_PP(method)+1, (void **)&function_handler) == FAILURE) { + if \
(zend_u_hash_find(fci->function_table, Z_TYPE_PP(method), lcname, lcname_len+1, (void \
**)&function_handler) == FAILURE) { + efree(lcname);
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied function does not \
exist" TSRMLS_CC); return 0;
}
+ efree(lcname);
fci->size = sizeof(zend_fcall_info);
fci->function_name = NULL;
--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic