#47141 [Asn->Csd]: SQLite3::lastErrorMsg, warning: object has not been correctly initialised
| From: | scottmac@php.net | Date: | Mon, 19 Jan 2009 22:45:39 +0000 |
| Subject: | #47141 [Asn->Csd]: SQLite3::lastErrorMsg, warning: object has not been correctly initialised | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133033@lists.php.net to get a copy of this message | ||
ID: 47141
Updated by: scottmac@php.net
Reported By: ladislav at marek dot su
-Status: Assigned
+Status: Closed
Bug Type: SQLite related
Operating System: *
PHP Version: 5.3CVS-2009-01-17 (snap)
Assigned To: scottmac
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.
Previous Comments:
------------------------------------------------------------------------
[2009-01-17 21:19:42] ladislav at marek dot su
Description:
------------
If SQlite3::__construct() fails (for example database file is not
writeable), is not possible to get last error messages or code.
Reproduce code:
---------------
$sqlite = @new Sqlite3('/nonwriteablefile', SQLITE3_OPEN_CREATE);
echo $sqlite->lastErrorMsg();
echo $sqlite->lastErrorCode();
Expected result:
----------------
Unable to open database: unable to open database file
??error code??
Actual result:
--------------
Warning: SQLite3::lastErrorCode() [sqlite3.lasterrorcode]: The
SQLite3 object has not been correctly initialised in %% on line %%
Warning: SQLite3::lastErrorCode() [sqlite3.lasterrorcode]: The
SQLite3 object has not been correctly initialised in %% on line %%
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47141&edit=1