summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2010-11-19 06:51:01 +0100
committerChristian Weiske <cweiske@cweiske.de>2010-11-19 07:06:08 +0100
commit5a8327be1dc3cba69296dbf82c6b2320cc3a0e2f (patch)
tree1eb740c4bd5cf7771c0c0c7bd126069fd74b2ec8
parente1f9d9e3a07652d4ec668a2337d8b788e031ab9f (diff)
downloadsemanticscuttle-5a8327be1dc3cba69296dbf82c6b2320cc3a0e2f.tar.gz
semanticscuttle-5a8327be1dc3cba69296dbf82c6b2320cc3a0e2f.tar.bz2
Fix bug #3111254: Search in my_watchlist results in error
-rw-r--r--doc/ChangeLog1
-rw-r--r--src/SemanticScuttle/Service/User.php6
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 0a60bff..60401d4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -6,6 +6,7 @@ ChangeLog for SemantiScuttle
- Fix bug in getTagsForBookmarks() that fetched all tags
- Fix bug #3073215: Updating bookmark time does not work
- Fix bug #3074816: French translation breaks edit javascript
+- Fix bug #3111254: Search in my_watchlist results in error
- Show error message on mysqli connection errors
- Implement patch #3059829: update FR_CA translation
- Update php-gettext library to 1.0.10
diff --git a/src/SemanticScuttle/Service/User.php b/src/SemanticScuttle/Service/User.php
index 6fc3bb7..091ea4d 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;