From e83b2e147a3d45f362a9556415668b8f81ce5822 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 26 May 2014 14:36:41 +0200 Subject: [PATCH] NoProfileException collision avoidance fix --- classes/Notice.php | 2 +- lib/noprofileexception.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 54b698d62b..8114ca9e67 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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]); } } diff --git a/lib/noprofileexception.php b/lib/noprofileexception.php index 49b0a7e117..3469f534c4 100644 --- a/lib/noprofileexception.php +++ b/lib/noprofileexception.php @@ -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);