ID:               31467
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Assigned
+Status:           Closed
 Bug Type:         SQLite related
 Operating System: *
-PHP Version:      Irrelevant
+PHP Version:      5.1.0-dev
 Assigned To:      helly
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

thanks


Previous Comments:
------------------------------------------------------------------------

[2005-01-10 08:10:40] [EMAIL PROTECTED]

The first patch is actually correct.  It's getting late, I'll be
leaving now. ;)

------------------------------------------------------------------------

[2005-01-10 07:08:28] [EMAIL PROTECTED]

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);


------------------------------------------------------------------------

[2005-01-10 06:58:34] [EMAIL PROTECTED]

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);




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31467&edit=1

Reply via email to