php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75374 ReflectionParameter::getDeclaringClass() can return n ull
Submitted: 2017-10-13 17:43 UTC Modified: 2018-01-29 22:53 UTC
From: benjamin dot morel at gmail dot com Assigned: vrana (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: benjamin dot morel at gmail dot com
New email:
PHP Version: OS:

 

 [2017-10-13 17:43 UTC] benjamin dot morel at gmail dot com
Description:
------------
when called on a function (not method) parameter, ReflectionParameter::getDeclaringClass() returns null.

The documentation should reflect this, as it currently implies that a ReflectionClass is always returned.

Expected result:
----------------
public ReflectionClass|null ReflectionParameter::getDeclaringClass ( void )

Actual result:
--------------
public ReflectionClass ReflectionParameter::getDeclaringClass ( void )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-29 22:53 UTC] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=344084
Log: Document return value for functions (bug #75374)
 [2018-01-29 22:53 UTC] vrana@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: vrana
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 11:00:02 2026 UTC