diff options
author | Christian Weiske <cweiske@cweiske.de> | 2010-11-19 06:51:01 +0100 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2010-11-19 06:51:01 +0100 |
commit | 29e7cf1aa5ca0e387fdb61372c7a590def694a2a (patch) | |
tree | 650e8722dc15b50187c32c42c9b0bb9400f5d9db /src/SemanticScuttle | |
parent | 77f4b48f9d184661715c32cfffaf2b5b7b441153 (diff) | |
download | semanticscuttle-29e7cf1aa5ca0e387fdb61372c7a590def694a2a.tar.gz semanticscuttle-29e7cf1aa5ca0e387fdb61372c7a590def694a2a.tar.bz2 |
Fix bug #3111254: Search in my_watchlist results in error
Diffstat (limited to 'src/SemanticScuttle')
-rw-r--r-- | src/SemanticScuttle/Service/User.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SemanticScuttle/Service/User.php b/src/SemanticScuttle/Service/User.php index fd9d84f..9ef8430 100644 --- a/src/SemanticScuttle/Service/User.php +++ b/src/SemanticScuttle/Service/User.php @@ -364,7 +364,7 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService public function getCurrentUserId() { if (isset($_SESSION[$this->getSessionKey()])) { - return $_SESSION[$this->getSessionKey()]; + return (int)$_SESSION[$this->getSessionKey()]; } else if (isset($_COOKIE[$this->getCookieKey()])) { $cook = explode(':', $_COOKIE[$this->getCookieKey()]); @@ -385,10 +385,10 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService if ($row = $this->db->sql_fetchrow($dbresult)) { $this->setCurrentUserId( - $row[$this->getFieldName('primary')] + (int)$row[$this->getFieldName('primary')] ); $this->db->sql_freeresult($dbresult); - return $_SESSION[$this->getSessionKey()]; + return (int)$_SESSION[$this->getSessionKey()]; } } return false; |