|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-01-10 06:58 UTC] irchtml@php.net
Description:
------------
In ext/sqlite/sqlite.c, sqlite_fetch_column_types doesn't allow the use of the optional parameter, result_type when not using the OO "interface". Patch follows.
Index: sqlite.c
===================================================================
RCS file: /repository/php-src/ext/sqlite/sqlite.c,v
retrieving revision 1.151
diff -u -B -r1.151 sqlite.c
--- sqlite.c 26 Nov 2004 13:17:30 -0000 1.151
+++ sqlite.c 10 Jan 2005 05:57:01 -0000
@@ -1591,8 +1591,8 @@
DB_FROM_OBJECT(db, object);
} else {
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
- ZEND_NUM_ARGS() TSRMLS_CC, "sr", &tbl, &tbl_len, &zdb) &&
- FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &zdb, &tbl, &tbl_len)) {
+ ZEND_NUM_ARGS() TSRMLS_CC, "sr|l", &tbl, &tbl_len, &zdb, &result_type) &&
+ FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &zdb, &tbl, &tbl_len, &result_type)) {
return;
}
DB_FROM_ZVAL(db, &zdb);
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 01:00:01 2025 UTC |
Apologies, above patch won't fix it, there was an extra parameter floating in there that isn't used. Index: sqlite.c =================================================================== RCS file: /repository/php-src/ext/sqlite/sqlite.c,v retrieving revision 1.151 diff -u -B -r1.151 sqlite.c --- sqlite.c 26 Nov 2004 13:17:30 -0000 1.151 +++ sqlite.c 10 Jan 2005 06:06:27 -0000 @@ -1576,7 +1576,6 @@ zval *zdb; struct php_sqlite_db *db; char *tbl, *sql; - int tbl_len; char *errtext = NULL; zval *object = getThis(); struct php_sqlite_result res; @@ -1585,14 +1584,14 @@ long result_type = PHPSQLITE_ASSOC; if (object) { - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &tbl, &tbl_len, &result_type)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &tbl, &result_type)) { return; } DB_FROM_OBJECT(db, object); } else { if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, - ZEND_NUM_ARGS() TSRMLS_CC, "sr", &tbl, &tbl_len, &zdb) && - FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &zdb, &tbl, &tbl_len)) { + ZEND_NUM_ARGS() TSRMLS_CC, "sr|l", &tbl, &zdb, &result_type) && + FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &zdb, &tbl, &result_type)) { return; } DB_FROM_ZVAL(db, &zdb);