]> granicus.if.org Git - php/commitdiff
Fixed bug #47141 - Unable to fetch error messages after the database can't be opened.
authorScott MacVicar <scottmac@php.net>
Mon, 19 Jan 2009 22:43:58 +0000 (22:43 +0000)
committerScott MacVicar <scottmac@php.net>
Mon, 19 Jan 2009 22:43:58 +0000 (22:43 +0000)
NEWS
ext/sqlite3/sqlite3.c

diff --git a/NEWS b/NEWS
index ab9bbaaaaa9fe7862dd97e2d974759800d8deced..2c8307ed313d26af8884cc9f92c626938d6411bf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -47,6 +47,8 @@ PHP                                                                        NEWS
 
 - Fixed building of pdo_sqlite without sqlite3. (Scott)
 
+- Fixed bug #47141 (Unable to fetch error messages from SQLite
+  when the database can't be opened). (Scott)
 - Fixed bug #47050 (mysqli_poll() modifies improper variables). (Johannes)
 - Fixed bug #47045 (SplObjectStorage instances compared with ==). (Etienne)
 - Fixed bug #46979 (use with non-compound name *has* effect). (Dmitry)
index 42585418d42507e0b4b1563dc2e32151b8ba61c8..2b11596e1b5524ec91e485af4cab11d9b4ebb908 100644 (file)
@@ -229,7 +229,7 @@ PHP_METHOD(sqlite3, lastErrorCode)
        zval *object = getThis();
        db_obj = (php_sqlite3_db_object *)zend_object_store_get_object(object TSRMLS_CC);
 
-       SQLITE3_CHECK_INITIALIZED(db_obj->initialised, SQLite3)
+       SQLITE3_CHECK_INITIALIZED(db_obj->db, SQLite3)
 
        if (zend_parse_parameters_none() == FAILURE) {
                return;
@@ -247,7 +247,7 @@ PHP_METHOD(sqlite3, lastErrorMsg)
        zval *object = getThis();
        db_obj = (php_sqlite3_db_object *)zend_object_store_get_object(object TSRMLS_CC);
 
-       SQLITE3_CHECK_INITIALIZED(db_obj->initialised, SQLite3)
+       SQLITE3_CHECK_INITIALIZED(db_obj->db, SQLite3)
 
        if (zend_parse_parameters_none() == FAILURE) {
                return;
@@ -943,7 +943,7 @@ PHP_METHOD(sqlite3stmt, clear)
        }
 
        if (sqlite3_clear_bindings(stmt_obj->stmt) != SQLITE_OK) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->stmt)));
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to clear statement: %s", sqlite3_errmsg(sqlite3_db_handle(stmt_obj->stmt)));
                RETURN_FALSE;
        }