|
cvs: pecl /pdo pdo_stmt.c: msg#00128php.pecl.cvs
helly Fri Jul 22 10:31:21 2005 EDT Modified files: /pecl/pdo pdo_stmt.c Log: - Add missing part to make colon in parameter binding optional http://cvs.php.net/diff.php/pecl/pdo/pdo_stmt.c?r1=1.115&r2=1.116&ty=u Index: pecl/pdo/pdo_stmt.c diff -u pecl/pdo/pdo_stmt.c:1.115 pecl/pdo/pdo_stmt.c:1.116 --- pecl/pdo/pdo_stmt.c:1.115 Fri Jul 22 00:33:56 2005 +++ pecl/pdo/pdo_stmt.c Fri Jul 22 10:31:20 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c,v 1.115 2005/07/22 04:33:56 wez Exp $ */ +/* $Id: pdo_stmt.c,v 1.116 2005/07/22 14:31:20 helly Exp $ */ /* The PDO Statement Handle Class */ @@ -303,7 +303,14 @@ } if (param->name) { - param->name = estrndup(param->name, param->namelen); + if (is_param && param->name[0] != ':') { + char *temp = emalloc(++param->namelen + 1); + temp[0] = ':'; + memmove(temp+1, param->name, param->namelen); + param->name = temp; + } else { + param->name = estrndup(param->name, param->namelen); + } zend_hash_update(hash, param->name, param->namelen, param, sizeof(*param), (void**)&pparam); } else { zend_hash_index_update(hash, param->paramno, param, sizeof(*param), (void**)&pparam); |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | cvs: pecl /http http_request_api.c: 00128, Michael Wallner |
|---|---|
| Next by Date: | cvs: pecl /http http_response_object.c php_http_response_object.h: 00128, Michael Wallner |
| Previous by Thread: | cvs: pecl /http http_request_api.ci: 00128, Michael Wallner |
| Next by Thread: | cvs: pecl /http http_response_object.c php_http_response_object.h: 00128, Michael Wallner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |