Explorar o código

fixed: 兼容array Or object.

gwang %!s(int64=3) %!d(string=hai) anos
pai
achega
f3b6bc0cca
Modificáronse 1 ficheiros con 8 adicións e 2 borrados
  1. 8 2
      Gameserver/Amfphp/base/Resp.php

+ 8 - 2
Gameserver/Amfphp/base/Resp.php

@@ -48,8 +48,14 @@ class Resp extends Object_ext {
         $this->events = self::$ext_events;
         $this->events = self::$ext_events;
         self::$ext_events = array();
         self::$ext_events = array();
         if (count($this->events) > 0) {
         if (count($this->events) > 0) {
-            if (!array_key_exists('store', (array) $this->result)) {
-                $this->result['store'] = req()->userInfo->game->store;
+            if (is_array($this->result)) {
+                if (!array_key_exists('store', (array) $this->result)) {
+                    $this->result['store'] = req()->userInfo->game->store;
+                }
+            } else {
+                if (!array_key_exists('store', (array) $this->result)) {
+                    $this->result->store = req()->userInfo->game->store;
+                }
             }
             }
         }
         }
     }
     }