Details
-
Type:
Task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: PHP-8.4.1
-
Fix Version/s: PHP-8.4.1, PHP-Apricot
-
Component/s: PHPDriver
-
Labels:None
-
Environment:
PHP all versions
Description
In PHP 5.3.x so far CUBRID Resource is not officially registered as PHP Resource. Therefore calling is_resource($conn) always returns "Unknown" even if $conn is active CUBRID connection.
I suggest to commit a patch to PHP core which introduces CUBRID Resource. See the above page for reference.
Issue Links
- duplicates
-
APIS-113
is_resource($link) does not return true
-
The following is the code I currently use as a workaround to determine if the object is an active resource.
if (is_resource($this->result_id) || get_resource_type($this->result_id) == "Unknown" && preg_match('/Resource id #/', strval($this->result_id))) { // this is an active resource }