Doctrine 1
  1. Doctrine 1
  2. DC-482

$data passed to foreach is wrong

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: Record
    • Labels:
      None
    • Environment:
      Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 (xampp 1.7.3)

      Description

      Calling a query that doesn't use all tablecols gives php warnings such as:

      Errorcode: E_WARNING [php warning] (2)
      Message: Invalid argument supplied for foreach()
      File: Record.php
      Line: 1151

      --------------------------------------------------------------
      $data = empty($data) ? $this->getTable()->find($id, Doctrine_Core::HYDRATE_ARRAY) : $data;
      foreach ($data as $field => $value) {
      --------------------------------------------------------------

      $data is empty but not an array.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: