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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dmitry@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 02:01:28 2024 UTC