From 7be46410409d7c30b0a3bd5eb6d9492298726c92 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 27 Mar 2016 14:54:14 +0200 Subject: [PATCH] Actually return an Ostatus_profile --- plugins/OStatus/classes/Ostatus_profile.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 2b1ab8ddd9..5673d51457 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -80,12 +80,13 @@ class Ostatus_profile extends Managed_DataObject return $this->uri; } - public function fromProfile(Profile $profile) + static function fromProfile(Profile $profile) { - $oprofile = Ostatus_profile::getKV('profile_id', $profile->id); + $oprofile = Ostatus_profile::getKV('profile_id', $profile->getID()); if (!$oprofile instanceof Ostatus_profile) { - throw new Exception('No Ostatus_profile for Profile ID: '.$profile->id); + throw new Exception('No Ostatus_profile for Profile ID: '.$profile->getID()); } + return $oprofile; } /**