]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Fix bug #3111254: Search in my_watchlist results in error
authorChristian Weiske <cweiske@cweiske.de>
Fri, 19 Nov 2010 05:51:01 +0000 (06:51 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 19 Nov 2010 06:06:08 +0000 (07:06 +0100)
doc/ChangeLog
src/SemanticScuttle/Service/User.php

index 0a60bff247867423708d4f9eebd8e1e4f3fa53a6..60401d46fcae02bb505f893b1c5b441bda4a248e 100644 (file)
@@ -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
index 6fc3bb70760d1b9cd987344bff75716174b6259c..091ea4d5f9fe6b15c9d9bf8dbbfdaac5d8c6fe3b 100644 (file)
@@ -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;