From b469030b12e80147d406fc00b75afe024a329402 Mon Sep 17 00:00:00 2001 From: Aaron Wells Date: Mon, 25 Jul 2016 10:56:35 +1200 Subject: [PATCH] Bug 1605127: Method signature mismatch in Activity::update_url() The abstract Activity class defines the function update_url() with no parameters, but the two subclasses that override it define it with one parameter. This will cause problems in PHP 7. It's always called with one parameter, (even in the Activity class itself) so the best option is to add one parameter to the implementation in Activity. Change-Id: I810061ed6f8c55101327e2e907bb68ebf9870380 behatnotneeded: Covered by existing tests --- htdocs/lib/activity.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/activity.php b/htdocs/lib/activity.php index a3fe72865..537c0f727 100644 --- a/htdocs/lib/activity.php +++ b/htdocs/lib/activity.php @@ -706,8 +706,15 @@ abstract class ActivityType { return $this->subject; } - // rewrite the url with the internal notification id? - protected function update_url() { + /** + * Rewrite $this->url with the ID of the internal notification record for this activity. + * (Generally so that you can make a URL that sends the user to the Mahara inbox page + * for this message.) + * + * @param int $internalid + * @return boolean True if $this->url was updated, False if not. + */ + protected function update_url($internalid) { return false; } -- 2.22.0