From: demeritcowboy Date: Tue, 21 Sep 2021 04:10:50 +0000 (-0400) Subject: avoid error in test environments using built-in php web server X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f4b49c3c09443837d4c73e8ba76faeec9ca5066c;p=civicrm-core.git avoid error in test environments using built-in php web server --- 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}"; }