From ca4ce861aadb00851d422bc21129dcde577493a1 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 14 Mar 2018 22:19:49 -0700 Subject: [PATCH] CRM_Utils_Hook::alterRedirect - Pass URL by reference PSR-7 specifies that the `UriInterface` is immutable. There are methods like `withQuery(...)` which generate a *new instance*. For the hook to support altering the URL, you must be able to replace the `$url` with a newer instance. --- CRM/Utils/Hook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index 3127ff1d20..c6b99274fb 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1649,7 +1649,7 @@ abstract class CRM_Utils_Hook { * @return null * the return value is ignored */ - public static function alterRedirect($url, &$context) { + public static function alterRedirect(&$url, &$context) { return self::singleton()->invoke(array('url', 'context'), $url, $context, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, -- 2.25.1