php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47141 SQLite3::lastErrorMsg, warning: object has not been correctly initialised
Submitted: 2009-01-17 21:19 UTC Modified: 2009-01-19 22:45 UTC
From: ladislav at marek dot su Assigned: scottmac (profile)
Status: Closed Package: SQLite related
PHP Version: 5.3CVS-2009-01-17 (snap) OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ladislav at marek dot su
New email:
PHP Version: OS:

 

 [2009-01-17 21:19 UTC] 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 %%

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-19 22:45 UTC] scottmac@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC