Bug #54718 [Opn->Bgs]: get_resource_type work not correct
| From: | felipe@php.net | Date: | Sat, 21 May 2011 00:24:15 +0000 |
| Subject: | Bug #54718 [Opn->Bgs]: get_resource_type work not correct | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160878@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54718&edit=1
ID: 54718
Updated by: felipe@php.net
Reported by: aiive at list dot ru
Summary: get_resource_type work not correct
-Status: Open
+Status: Bogus
Type: Bug
Package: Variables related
Operating System: Debian
PHP Version: 5.2.17
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The documentation says:
"If the given handle is a resource, this function will return a string
representing its type. **If the type is not identified by this function,
the return value will be the string Unknown.**
This function will return FALSE and generate an error if handle is not a
resource."
Previous Comments:
------------------------------------------------------------------------
[2011-05-12 12:18:48] aiive at list dot ru
Description:
------------
In documentation write
"This function will return FALSE and generate an error if handle is not
a
resource."
But in test script get_resource_type return "Unknown" instead FALSE.
Test script:
---------------
mysql_free_result($res);
var_dump(is_resource($res));
var_dump(get_resource_type($res));
Expected result:
----------------
bool(true)
string(7) "Unknown"
or
bool(false)
bool(false)
Actual result:
--------------
bool(false)
string(7) "Unknown"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54718&edit=1