|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73702 get_resource_type returns NULL instead of false
Submitted: 2016-12-09 14:21 UTC Modified: 2017-01-28 15:28 UTC
From: martijn at openbsd dot org Assigned: cmb (profile)
Status: Closed Package: Variables related
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: martijn at openbsd dot org
New email:
PHP Version: OS:


 [2016-12-09 14:21 UTC] martijn at openbsd dot org
According to get_resource_type should return FALSE if $handle is not a resource, but it returns NULL.
I reckon that returning false is the proper response and that following the documentation is the more sane option.

Test script:

Expected result:

Actual result:


get_resource_type_false (last revision 2016-12-09 14:21 UTC by martijn at openbsd dot org)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-09 23:16 UTC]
If zend_parse_paramters() fails, it is customary to simply return, what results in NULL, so in my opinion, this is a documentation bug.
 [2017-01-28 15:27 UTC]
Automatic comment from SVN on behalf of cmb
Log: Fix #73702: get_resource_type returns NULL instead of false
 [2017-01-28 15:28 UTC]
-Status: Open +Status: Closed -Type: Bug +Type: Documentation Problem -Package: Documentation problem +Package: Variables related -Assigned To: +Assigned To: cmb
 [2020-02-07 06:06 UTC]
Automatic comment on behalf of cmb
Log: Fix #73702: get_resource_type returns NULL instead of false
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 17:01:26 2021 UTC