Edit report at http://bugs.php.net/bug.php?id=54718&edit=1

 ID:                 54718
 Updated by:         fel...@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

Reply via email to