]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
NoProfileException collision avoidance fix
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 26 May 2014 12:36:41 +0000 (14:36 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 26 May 2014 12:39:03 +0000 (14:39 +0200)
classes/Notice.php
lib/noprofileexception.php

index 54b698d62b9ec4355545455fa1961fb322d5b460..8114ca9e670ebdb19facbc54c45695d374a26115 100644 (file)
@@ -2521,7 +2521,7 @@ class Notice extends Managed_DataObject
                                $notice->_setProfile($map[$notice->profile_id]);
                        }
             } catch (NoProfileException $e) {
-                common_log(LOG_WARNING, "Failed to fill profile in Notice with non-existing entry for profile_id: {$e->id}");
+                common_log(LOG_WARNING, "Failed to fill profile in Notice with non-existing entry for profile_id: {$e->profile_id}");
                 unset($notices[$entry]);
             }
                }
index 49b0a7e1176a7fdee24cf5d72ae6e7af883ba2ff..3469f534c4b3c6ebdf6a0106e0c9b9da13a12ce4 100644 (file)
@@ -45,12 +45,12 @@ class NoProfileException extends ServerException
 
     public function __construct($profile_id, $msg=null)
     {
-        $this->id = $profile_id;
+        $this->profile_id = $profile_id;
 
         if ($msg === null) {
             // TRANS: Exception text shown when no profile can be found for a user.
-            // TRANS: %1$s is a user nickname, $2$d is a user ID (number).
-            $msg = sprintf(_('There is no profile with id==%u'), $this->id);
+            // TRANS: %u is a profile ID (number).
+            $msg = sprintf(_('There is no profile with id==%u'), $this->profile_id);
         }
 
         parent::__construct($msg, 404);