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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 02:01:28 2025 UTC