php.net |  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:
MUST BE VALID
Solve the problem:
42 - 31 = ?
Subscribe to this entry?

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

SQLite3::open

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
//output
//bool(true)


Actual result:
--------------
//Create File 'test.sqlite3' And
//output
//NULL


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-10 08:51 UTC] scottmac@php.net
documentation is wrong, it returns void always. Exception on error
 [2011-05-10 10:10 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2011-05-10 10:10 UTC] aharvey@php.net
Looks like the prototype comments are wrong in the actual source, too.
 [2011-05-10 10:14 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=310877
Log: Fix bug #54692 (SQLite3::open() Return Value) by correcting the SQLite3::open()
prototype.
 [2011-05-10 10:43 UTC] aharvey@php.net
-Status: Assigned +Status: Closed
 [2011-05-10 10:43 UTC] aharvey@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Documentation and source updated.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 08:01:28 2024 UTC