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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC