Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Major fix in closures

  • Loading branch information...
commit 4f401f2a5243f668ae14791bb1b8b88a644b7f9b 1 parent cb5859a
Klederson Bueno authored May 25, 2012

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. 7  app/libs/Model.php
7  app/libs/Model.php
@@ -1176,12 +1176,17 @@ public function toArray($recursive = true, $full = false, $insane = false) {
1176 1176
     foreach ($this->getMap()->fields as $fieldName => $info) {
1177 1177
       if ($this->getMap()->getRelationShip($fieldName) == true && $recursive == true) {
1178 1178
         if (get_parent_class($this->$fieldName) == 'PhpBURN_Core') {
1179  
-          if (count($this->$fieldName->getAmount()) > 0)
  1179
+          if (count($this->$fieldName->getAmount()) > 0) {
  1180
+            $this->$fieldName->_moveFirst();
  1181
+
1180 1182
             while ($this->$fieldName->fetch()) {
1181 1183
               $return[$fieldName][] = $this->$fieldName->toArray();
1182 1184
             }
1183 1185
             
1184 1186
             $this->$fieldName->_moveFirst();
  1187
+          }
  1188
+            
  1189
+            
1185 1190
         }
1186 1191
       } else {
1187 1192
 //        $return[$fieldName] = $this->getMap()->getFieldValue($fieldName);

0 notes on commit 4f401f2

Please sign in to comment.
Something went wrong with that request. Please try again.