|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54692 SQLite3::open() Return Value
Submitted: 2011-05-08 23:14 UTC Modified: 2011-05-10 10:43 UTC
From: ostico at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: SQLite related
PHP Version: Irrelevant OS: Ubuntu Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
6 + 31 = ?
Subscribe to this entry?

 [2011-05-08 23:14 UTC] ostico at gmail dot com
As the Php Reference said:


Returns TRUE on success, FALSE on failure to open the database.

But this IS NOT TRUE.

It Returns NULL.

Test script:
class testSQLite3 extends SQLite3{
    public function __construct(){
        var_dump( $this->open('test.sqlite3') );
new testSQLite3();

Expected result:
//Create File 'test.sqlite3' And

Actual result:
//Create File 'test.sqlite3' And


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-10 08:51 UTC]
documentation is wrong, it returns void always. Exception on error
 [2011-05-10 10:10 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2011-05-10 10:10 UTC]
Looks like the prototype comments are wrong in the actual source, too.
 [2011-05-10 10:14 UTC]
Automatic comment from SVN on behalf of aharvey
Log: Fix bug #54692 (SQLite3::open() Return Value) by correcting the SQLite3::open()
 [2011-05-10 10:43 UTC]
-Status: Assigned +Status: Closed
 [2011-05-10 10:43 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Documentation and source updated.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 21 12:03:37 2021 UTC