Skip to content

Commit

Permalink
fix json encode miss
Browse files Browse the repository at this point in the history
  • Loading branch information
daasiri committed Nov 28, 2015
1 parent 6d203c8 commit b166140
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions emchat-server-php/Easemob.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down

0 comments on commit b166140

Please sign in to comment.