mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-11 17:11:30 +01:00
Fix exception on load a non existing player
This commit is contained in:
@@ -148,7 +148,8 @@ class OTS_Player extends OTS_Row_DAO
|
||||
|
||||
array_unshift($columns, 'id');
|
||||
|
||||
$this->data = PlayerModel::where('id', $id)->first($columns)->toArray();
|
||||
$query = PlayerModel::where('id', $id)->first($columns);
|
||||
$this->data = $query ? $query->toArray() : [];
|
||||
|
||||
// loads skills
|
||||
if( $this->isLoaded() && $load_skills) {
|
||||
|
||||
Reference in New Issue
Block a user