Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CiviReport - avoid error in test environments when using built-in php web server #21560

Merged
merged 1 commit into from
Sep 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CRM/Report/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,10 @@ public function preProcessCommon() {

// 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 ??=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhh - interesting - I didn't know that. Let's ditch php 7.3 support today....

$_SERVER['QUERY_STRING'] = '';
}
$_SERVER['QUERY_STRING'] .= "&qfKey={$this->controller->_key}";
}

Expand Down