php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30148 ReflectionMethod->isConstructor() fails for inherited classes
Submitted: 2004-09-19 00:55 UTC Modified: 2004-09-19 13:33 UTC
From: cellog@php.net Assigned: helly (profile)
Status: Closed Package: Class/Object related
PHP Version: 5.0.1 OS: *
Private report: No CVE-ID: None
 [2004-09-19 00:55 UTC] cellog@php.net
Description:
------------
isConstructor() should return true for child classes as well, but it does not.

Reproduce code:
---------------
<?php
class t
{
    function __construct(){}
}
class e extends t {}
$a = new ReflectionMethod('t','__construct');
$b = new ReflectionMethod('e','__construct');
var_dump($a->isConstructor());
var_dump($b->isConstructor());

Expected result:
----------------
bool(true)
bool(true)

Actual result:
--------------
bool(true)
bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-19 13:28 UTC] helly@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.
 [2004-09-19 13:33 UTC] helly@php.net
Fixed in 5.1-dev, we probably MFH it after 5.0.2 is out.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 08 20:01:36 2024 UTC