Fix issue accessing an array index on a boolean
This commit is contained in:
parent
907fd55a5c
commit
e1bfad3df7
1 changed files with 18 additions and 2 deletions
|
@ -103,7 +103,15 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
|
||||||
GENERAL_ERROR, 'Could not get user',
|
GENERAL_ERROR, 'Could not get user',
|
||||||
'', __LINE__, __FILE__, $query, $this->db
|
'', __LINE__, __FILE__, $query, $this->db
|
||||||
);
|
);
|
||||||
return false;
|
return [ 'uId' => 0,
|
||||||
|
'username' => '',
|
||||||
|
'name' => '',
|
||||||
|
'email' => '',
|
||||||
|
'homepage' => '',
|
||||||
|
'content' => '',
|
||||||
|
'datetime' => NULL,
|
||||||
|
'isAdmin' => false,
|
||||||
|
'privateKeey' => '' ];
|
||||||
}
|
}
|
||||||
|
|
||||||
$row = $this->db->sql_fetchrow($dbresult);
|
$row = $this->db->sql_fetchrow($dbresult);
|
||||||
|
@ -111,7 +119,15 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
|
||||||
if ($row) {
|
if ($row) {
|
||||||
return $row;
|
return $row;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return [ 'uId' => 0,
|
||||||
|
'username' => '',
|
||||||
|
'name' => '',
|
||||||
|
'email' => '',
|
||||||
|
'homepage' => '',
|
||||||
|
'content' => '',
|
||||||
|
'datetime' => NULL,
|
||||||
|
'isAdmin' => false,
|
||||||
|
'privateKeey' => '' ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue