Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-103

Error: CCI, -13, Column index is out of range when calling cubrid_fetch_field()

    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: PHP Driver
    • Labels:
      None
    • Environment:

      CUBRID 8.4.1
      PHP API 8.4.1
      Ubuntu 11.10

      Description

      I have the following table:

      {code}
      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")
      );{code}

      When calling cubrid_fetch_field() in:

      {code}
      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;
      }{code}

      I receive the following error:

      {code}
      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{code}

      According to cubrid_fetch_field() manual, if no more field is found, it should return FALSE. Is it a bug?

        Activity

        Hide
        kadishmal Esen Sagynov added a comment -

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

        Show
        kadishmal Esen Sagynov added a comment - Should I suppress the error by @ like @cubrid_fetch_field() ?
        Hide
        hellohuizhang 张慧 added a comment -

        Commit rev: 457

        Show
        hellohuizhang 张慧 added a comment - Commit rev: 457
        Hide
        hellohuizhang 张慧 added a comment -

        We have resolved this issue on PHP-8.4.1 and PHP-Apricot.

        If you have any problem, please let me know.

        Thank you!

        Show
        hellohuizhang 张慧 added a comment - We have resolved this issue on PHP-8.4.1 and PHP-Apricot. If you have any problem, please let me know. Thank you!

          People

          • Assignee:
            hellohuizhang 张慧
            Reporter:
            kadishmal Esen Sagynov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: