#47141 [Opn->Asn]: SQLite3::lastErrorMsg, warning: object has not been correctly initialised

From: Date: Sat, 17 Jan 2009 23:18:16 +0000
Subject: #47141 [Opn->Asn]: SQLite3::lastErrorMsg, warning: object has not been correctly initialised
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-132979@lists.php.net to get a copy of this message
ID: 47141 Updated by: johannes@php.net Reported By: ladislav at marek dot su -Status: Open +Status: Assigned Bug Type: SQLite related Operating System: * PHP Version: 5.3CVS-2009-01-17 (snap) -Assigned To: +Assigned To: scottmac 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

« previous php.bugs (#132979) next »