php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47769 Strange extends PDO
Submitted: 2009-03-25 06:43 UTC Modified: 2009-03-26 12:54 UTC
From: admin at d9tx dot com Assigned: felipe
Status: Closed Package: PDO related
PHP Version: 5.3.0RC1 OS: xp sp3
Private report: No CVE-ID:
 [2009-03-25 06:43 UTC] admin at d9tx dot com
Description:
------------
if extends pdo, then visibility keyword work failure.

Reproduce code:
---------------
class test extends PDO
{
    private function isPrivate()
    {
        echo 'this is a private method.';
    }
}

$test = new test('sqlite:./test/mydb.sq3');
$test->isPrivate();
// bad output: this is a private method.

Expected result:
----------------
class test extends PDO
{
    private function isPrivate()
    {
        echo 'this is a private method.';
    }
}

$test = new test('sqlite:./test/mydb.sq3');
$test->isPrivate();
// Expected output: Fatal error: Call to private method test::isPrivate() from


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-26 12:54 UTC] felipe@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in 5.3CVS and HEAD.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 25 07:02:14 2014 UTC