Commit 2e6e9d6d authored by runa's avatar runa

array was not initalized

parent dc73de10
......@@ -596,6 +596,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
*/
public function loadRelated($name = null)
{
$list = array();
$query = new Doctrine_Query($this->table->getConnection());
if ( ! isset($name)) {
......@@ -616,7 +617,6 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
$foreign = $rel->getForeign();
$local = $rel->getLocal();
$list = array();
if ($rel instanceof Doctrine_Relation_LocalKey || $rel instanceof Doctrine_Relation_ForeignKey) {
foreach ($this->data as $record) {
$list[] = $record[$local];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment