function getProfile()
{
- if ($this->_profile == -1) {
+ if (is_int($this->_profile) && $this->_profile == -1) {
$this->_profile = Profile::staticGet('id', $this->profile_id);
if (empty($this->_profile)) {
function getUser()
{
- if ($this->_user == -1) {
+ if (is_int($this->_user) && $this->_user == -1) {
$this->_user = User::staticGet('id', $this->id);
}
*/
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);