php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54691 SQLite3::open() Return Value
Submitted: 2011-05-08 22:58 UTC Modified: 2011-05-10 10:09 UTC
From: ostico at gmail dot com Assigned:
Status: Duplicate Package: SQLite related
PHP Version: Irrelevant OS: Ubuntu Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ostico at gmail dot com
New email:
PHP Version: OS:

 

 [2011-05-08 22:58 UTC] ostico at gmail dot com
Description:
------------
Documentation Says:

SQLite3::open

---

Return Values:

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

---

Not True.

It can return NULL if we are in creation context.


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

 

Expected result:
----------------
//Create File 'test.sqlite' And
//output
//bool(true)

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-08 23:08 UTC] ostico at gmail dot com
It Return NULL
 [2011-05-10 10:09 UTC] aharvey@php.net
-Status: Open +Status: Duplicate
 [2011-05-10 10:09 UTC] aharvey@php.net
Duplicate of bug #54692.
 [2011-05-10 10:42 UTC] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=310878
Log: Update the documentation per bug #54691 (SQLite3::open() Return Value).
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 21 06:01:23 2020 UTC