]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Fix bug #3111254: Search in my_watchlist results in error
authorChristian Weiske <cweiske@cweiske.de>
Tue, 15 Feb 2011 06:55:10 +0000 (07:55 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 15 Feb 2011 06:55:10 +0000 (07:55 +0100)
(cherry picked from commit 5a8327be1dc3cba69296dbf82c6b2320cc3a0e2f)

Conflicts:

doc/ChangeLog

doc/ChangeLog
src/SemanticScuttle/Service/User.php

index 5925a8542603af67d2c2d9564b9142a58a8a9a9d..68b2084d0fc2d83ae970be978f1c5c1c00f8a4c8 100644 (file)
@@ -6,6 +6,7 @@ ChangeLog for SemantiScuttle
 - Fix bug #3178597: Broken link to context in gsearch admin index page
 - Fix bug #3074816: French translation breaks edit javascript
    This also fixes #3094047 and #3178592
+- Fix bug #3111254: Search in my_watchlist results in error
 
 
 0.97.1 - 2010-09-30
index 281c18c2b9695d201b85512d960228ea55759523..5238690f01b6d902489e92f59f41ffc5dbfc14f2 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;