From: ladislav at marek dot su
Operating system: *
PHP version: 5.3CVS-2009-01-17 (snap)
PHP Bug Type: SQLite related
Bug description: SQLite3::lastErrorMsg, warning: object has not been correctly
initialised
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 bug report at http://bugs.php.net/?id=47141&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47141&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47141&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47141&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47141&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47141&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47141&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47141&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47141&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47141&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47141&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47141&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47141&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47141&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47141&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47141&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47141&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47141&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47141&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47141&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47141&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47141&r=mysqlcfg