|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49320 PDO returns null when SQLite connection fails
Submitted: 2009-08-21 13:45 UTC Modified: 2010-06-13 00:05 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: brandon at brandonsavage dot net Assigned: felipe (profile)
Status: Closed Package: PDO related
PHP Version: 5.2.10 OS: All
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.
Block user comment
Status: Assign to:
Bug Type:
From: brandon at brandonsavage dot net
New email:
PHP Version: OS:


 [2009-08-21 13:45 UTC] brandon at brandonsavage dot net
The PDO extension should either return an object or throw an exception. However, with PDO and the SQLite driver, this does not happen.

Reproduce code:

//Use the wrong driver so the connection fails
$pdo = new PDO('sqlite2:bookstore.db');


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-21 14:16 UTC] brandon at brandonsavage dot net
The version is mentioned as 5.2.10 but i tested this in 5.3.0 and it exists there as well.
 [2009-12-06 22:15 UTC]
Please try using this snapshot:
For Windows:

 [2009-12-14 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-06-13 00:04 UTC]
Automatic comment from SVN on behalf of felipe
Log: - Fixed bug #49320 (PDO returns null when SQLite connection fails)
 [2010-06-13 00:05 UTC]
-Status: No Feedback +Status: Closed -Assigned To: +Assigned To: felipe
 [2010-06-13 00:05 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.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 09:01:27 2023 UTC