Commit a023d995 authored by w2040w's avatar w2040w

fix chat messages show on PHP7

parent 93ab0326
...@@ -376,7 +376,7 @@ function getchat($last,$team='',$limit=0) { ...@@ -376,7 +376,7 @@ function getchat($last,$team='',$limit=0) {
global $db,$tablepre,$chatlimit,$chatinfo,$plsinfo; global $db,$tablepre,$chatlimit,$chatinfo,$plsinfo;
$limit = $limit ? $limit : $chatlimit; $limit = $limit ? $limit : $chatlimit;
$result = $db->query("SELECT * FROM {$tablepre}chat WHERE cid>'$last' AND (type!='1' OR (type='1' AND recv='$team')) ORDER BY cid desc LIMIT $limit"); $result = $db->query("SELECT * FROM {$tablepre}chat WHERE cid>'$last' AND (type!='1' OR (type='1' AND recv='$team')) ORDER BY cid desc LIMIT $limit");
$chatdata = Array('lastcid' => $last, 'msg' => ''); $chatdata = Array('lastcid' => $last, 'msg' => array());
if(!$db->num_rows($result)){$chatdata = array('lastcid' => $last, 'msg' => '');return $chatdata;} if(!$db->num_rows($result)){$chatdata = array('lastcid' => $last, 'msg' => '');return $chatdata;}
while($chat = $db->fetch_array($result)) { while($chat = $db->fetch_array($result)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment