From b166140df26dab14583c71ec2637b5c3ba0deed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lynch=28=E6=9D=8E=E4=BC=9F=29?= Date: Sat, 28 Nov 2015 19:45:09 +0800 Subject: [PATCH] fix json encode miss --- emchat-server-php/Easemob.class.php | 1 + 1 file changed, 1 insertion(+) 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'];