DengTao 8 years ago
parent
commit
952dc66238
1 changed files with 7 additions and 6 deletions
  1. 7 6
      www/protected/commands/GetKennelDetailWorkCommand.php

+ 7 - 6
www/protected/commands/GetKennelDetailWorkCommand.php

@@ -128,14 +128,15 @@ class GetKennelDetailWorkCommand extends CConsoleCommand {
                         foreach ($tmp['tags'] as $v){
                             $dealPet->tags[] = $v;
                         }*/
-                        $tmp['father_info'] = array();
-                        $tmp['mother_info'] = array();
+                        $father_info = array();
+                        $mother_info = array();
                         if (isset($tmp['extra']['parents'][0]['pic']))
-                            $tmp['father_info']['avatar'] = $tmp['extra']['parents'][0]['pic'];
+                            $father_info['avatar'] = $tmp['extra']['parents'][0]['pic'];
                         if (isset($tmp['extra']['parents'][1]['pic']))
-                            $tmp['mother_info']['avatar'] = $tmp['extra']['parents'][1]['pic'];
-                        $dealPet->father_info = (object)$tmp['father_info'];
-                        $dealPet->mother_info = (object)$tmp['mother_info'];
+                            $mother_info['avatar'] = $tmp['extra']['parents'][1]['pic'];
+                        var_dump((object)$father_info);exit;
+                        $dealPet->father_info = (object)$father_info;
+                        $dealPet->mother_info = (object)$mother_info;
                         $dealPet->desc = $tmp['desc'];
                         $dealPet->vaccine_info = array();
                         if (isset($tmp['extra'])){