Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: PHP-8.4.1
-
Fix Version/s: PHP-8.4.1, PHP-Apricot
-
Component/s: PHPDriver
-
Labels:None
-
Environment:
CUBRID 8.4.1
PHP API 8.4.1
Ubuntu 11.10
Description
I have the following table:
CREATE TABLE "tbl_users"(
"id" integer AUTO_INCREMENT,
"email" character varying(100) NOT NULL UNIQUE,
"join_date" integer NOT NULL,
CONSTRAINT pk_tbl_users_id PRIMARY KEY("id")
);
When calling cubrid_fetch_field() in:
Line 82:
while ($field = cubrid_fetch_field($this->result_id))
{
preg_match('/([a-zA-Z]+)(\((\d+)\))?/', $field->type, $matches);
$length = isset($matches[2]) ? (int)$matches[3] : false;
$F = new stdClass();
$F->name = $field->name;
$F->type = $matches[1];
$F->default = $field->def;
$F->max_length = $length ? $length : $field->max_length;
$F->primary_key = $field->primary_key;
$retval[] = $F;
}
I receive the following error:
A PHP Error was encountered Severity: Warning Message: Error: CCI, -13, Column index is out of range Filename: cubrid/cubrid_result.php Line Number: 82
According to cubrid_fetch_field() manual, if no more field is found, it should return FALSE. Is it a bug?

Should I suppress the error by @ like @cubrid_fetch_field()?