Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

PHP's native is_resource() function currently does not recognize CUBR…

…ID resource. So this patch allows to reliable determine if CUBBRID resource is a resource.
  • Loading branch information...
commit aa57e478c24fe577a42fb42df74c3468dd6285aa 1 parent 295f969
@kadishmal kadishmal authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 system/database/drivers/cubrid/cubrid_driver.php
View
4 system/database/drivers/cubrid/cubrid_driver.php
@@ -332,7 +332,9 @@ function escape_str($str, $like = FALSE)
return $str;
}
- if (function_exists('cubrid_real_escape_string') AND is_resource($this->conn_id))
+ if (function_exists('cubrid_real_escape_string') AND (is_resource($this->conn_id) ||
+ get_resource_type($this->conn_id) == "Unknown" &&
+ preg_match('/Resource id #/', strval($this->conn_id))))
{
$str = cubrid_real_escape_string($str, $this->conn_id);
}
Please sign in to comment.
Something went wrong with that request. Please try again.