php.net |  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: dmitry@php.net Assigned:
Status: Not a bug Package: PDO SQLite
PHP Version: master-Git-2014-05-20 (Git) OS: *
Private report: No CVE-ID: None
 [2014-05-20 09:45 UTC] dmitry@php.net
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-20 09:54 UTC] dmitry@php.net
-Status: Open +Status: Not a bug
 [2014-05-20 09:54 UTC] dmitry@php.net
it's probably my mistake, however PDO behaviour is really wired
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 26 07:03:37 2021 UTC