diff --git a/emchat-server-php/Easemob.class.php b/emchat-server-php/Easemob.class.php index a3d7643..dc4635d 100644 --- a/emchat-server-php/Easemob.class.php +++ b/emchat-server-php/Easemob.class.php @@ -340,6 +340,7 @@ public function getToken() { $arr = unserialize ( fgets ( $fp ) ); if ($arr ['expires_in'] < time ()) { $result = $this->postCurl ( $url, $option, $head = 0 ); + $result = json_decode($result); $result ['expires_in'] = $result ['expires_in'] + time (); @fwrite ( $fp, serialize ( $result ) ); return $result ['access_token'];