diff options
author | Christian Weiske <cweiske@cweiske.de> | 2011-02-15 07:55:10 +0100 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2011-02-15 07:55:10 +0100 |
commit | 17e097d4f828a71b2278167b20a5f05bb51da2f0 (patch) | |
tree | e3ee446fb07c65419b80c55cadfb33f68283d85d /src/SemanticScuttle/Service/User.php | |
parent | 60814a1bd3d3ac2b8ee7c985f6e7f14a00282571 (diff) | |
download | semanticscuttle-17e097d4f828a71b2278167b20a5f05bb51da2f0.tar.gz semanticscuttle-17e097d4f828a71b2278167b20a5f05bb51da2f0.tar.bz2 |
Fix bug #3111254: Search in my_watchlist results in error
(cherry picked from commit 5a8327be1dc3cba69296dbf82c6b2320cc3a0e2f)
Conflicts:
doc/ChangeLog
Diffstat (limited to 'src/SemanticScuttle/Service/User.php')
-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 281c18c..5238690 100644 --- a/src/SemanticScuttle/Service/User.php +++ b/src/SemanticScuttle/Service/User.php @@ -356,7 +356,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 = split(':', $_COOKIE[$this->getCookieKey()]); @@ -377,10 +377,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; |