forked from GNUsocial/gnu-social
Fix type conversion warnings caused when calling getUser / getProfile for the second time
This commit is contained in:
@@ -80,7 +80,7 @@ class User extends Memcached_DataObject
|
||||
*/
|
||||
function getProfile()
|
||||
{
|
||||
if ($this->_profile == -1) { // invalid but distinct from null
|
||||
if (is_int($this->_profile) && $this->_profile == -1) { // invalid but distinct from null
|
||||
$this->_profile = Profile::staticGet('id', $this->id);
|
||||
if (empty($this->_profile)) {
|
||||
throw new UserNoProfileException($this);
|
||||
|
Reference in New Issue
Block a user