[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [donate/master] Fixed notice with reset in subscription-request



commit 77d09d0e2563b4da637a25cf7f6e6be38ead5442
Author: Peter Haight <peterh@xxxxxxxxxxxxxxx>
Date:   Fri Oct 2 14:46:22 2020 -0700

    Fixed notice with reset in subscription-request
    
    reset takes a reference, so we can't just pass the result of a function.
    
    Issue #48283
---
 src/SubscriptionController.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/SubscriptionController.php b/src/SubscriptionController.php
index 7b8f7bc9..aaa9504a 100644
--- a/src/SubscriptionController.php
+++ b/src/SubscriptionController.php
@@ -102,7 +102,8 @@ class SubscriptionController extends BaseController {
       return $response->withRedirect($this->settings->get('subscriptionRequestSentUrl', '/subscription-request-sent'));
     } else {
       if (ArrayExt::fetch($parsedBody, 'returnToReferrer')) {
-        $referer = reset($request->getHeader("HTTP_REFERER"));
+        $referers = $request->getHeader("HTTP_REFERER");
+        $referer = reset($referers);
         $uri = Uri::createFromString($referer);
         $uri->addQueryParam('errors', json_encode($errors));
         return $response->withRedirect($uri->toString());



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits