Doctrine 1
  1. Doctrine 1
  2. DC-656

Endless loop when using HYDRATE_SINGLE_SCALAR and Oracle OCI adapter Doctrine

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2, 1.2.3
    • Fix Version/s: 1.2.3
    • Component/s: Connection
    • Labels:
      None

      Description

      Following loop inside Doctrine_Hydrator_SingleScalarDriver never terminates since fetchColumn inside Doctrine_Adapter_Statement_Oracle never returns FALSE.

      while (($val = $stmt->fetchColumn()) !== false)

      { $result[] = $val; } Below is the patch for Doctrine_Adapter_Statement_Oracle ---------------------------------------------------------------------------------------------------------------------------------- Index: Oracle.php =================================================================== --- Oracle.php (revision 7546) +++ Oracle.php (working copy) @@ -398,7 +398,7 @@ return false; }

      $row = $this->fetch(Doctrine_Core::FETCH_NUM);

      • return $row[$columnIndex];
        + return ($row===false) ? false : $row[$columnIndex];
        }

      /**
      ----------------------------------------------------------------------------------------------------------------------------------

        Activity

        Hide
        Jonathan H. Wage added a comment -

        This appears to be already fixed by http://trac.doctrine-project.org/changeset/7578

        Show
        Jonathan H. Wage added a comment - This appears to be already fixed by http://trac.doctrine-project.org/changeset/7578

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            vadik56
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: