From f4b49c3c09443837d4c73e8ba76faeec9ca5066c Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 21 Sep 2021 00:10:50 -0400 Subject: [PATCH] avoid error in test environments using built-in php web server --- CRM/Report/Form.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 352bbf35ec..da4e6ba09d 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -626,6 +626,10 @@ class CRM_Report_Form extends CRM_Core_Form { // set qfkey so that pager picks it up and use it in the "Next > Last >>" links. // FIXME: Note setting it in $_GET doesn't work, since pager generates link based on QUERY_STRING + if (!isset($_SERVER['QUERY_STRING'])) { + // in php 7.4 can do this with less lines with ??= + $_SERVER['QUERY_STRING'] = ''; + } $_SERVER['QUERY_STRING'] .= "&qfKey={$this->controller->_key}"; } -- 2.25.1