|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67307 Test ext/pdo_sqlite/tests/bug43831.phpt provides invalid expectation
Submitted: 2014-05-20 09:45 UTC Modified: 2014-05-20 09:54 UTC
From: Assigned:
Status: Not a bug Package: PDO SQLite
PHP Version: master-Git-2014-05-20 (Git) OS: *
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:
New email:
PHP Version: OS:


 [2014-05-20 09:45 UTC]
The test provides invalid expectation and hides the real problem.
for some reason the second assignment statement changes the value of $bar.
It's done not on purpose.

$bar = new PDO("sqlite::memory:", null, null, array(PDO::ATTR_PERSISTENT => true));
$baz = new MyPDO("sqlite::memory:", null, null, array(PDO::ATTR_PERSISTENT => true));

var_dump($bar); // Prints object(MyPDO) instead of object(PDO)

the bug and test are fixed in phpng.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-20 09:54 UTC]
-Status: Open +Status: Not a bug
 [2014-05-20 09:54 UTC]
it's probably my mistake, however PDO behaviour is really wired
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Feb 20 23:01:27 2024 UTC