Skip to content

Commit

Permalink
Merge pull request #5 from liyu001989/master
Browse files Browse the repository at this point in the history
fix count problem in php 7.2
  • Loading branch information
summerblue committed Jan 23, 2018
2 parents 2017117 + 122dbcc commit 3dd3a32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Models/Traits/ActiveUserHelper.php
Expand Up @@ -64,7 +64,7 @@ private function calculateActiveUsers()
$user = $this->find($user_id);

// 如果数据库里有该用户的话
if (count($user)) {
if ($user) {

// 将此用户实体放入集合的末尾
$active_users->push($user);
Expand Down Expand Up @@ -113,4 +113,4 @@ private function cacheActiveUsers($active_users)
// 将数据放入缓存中
Cache::put($this->cache_key, $active_users, $this->cache_expire_in_minutes);
}
}
}

0 comments on commit 3dd3a32

Please sign in to comment.