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

CRM-19941 CRM-20943 Fix issue in PHP7.1 using is non object mode in … #10724

Merged
merged 1 commit into from
Jul 23, 2017

Conversation

seamuslee001
Copy link
Contributor

@seamuslee001 seamuslee001 commented Jul 22, 2017

…AtoZ Pager

@spalmstr Stephen can you test this out, I think NULL makes the most amount of sense here rather than some uninitilised variable.

@seamuslee001
Copy link
Contributor Author

@totten @eileenmcnaughton Tim and Eileen does this make sense to you two?

@eileenmcnaughton
Copy link
Contributor

No it terrifies me - not your patch - but that whole way retrieve sets variables on the form for reasons I don't understand but which may or may not relate to cross-tab submission

@seamuslee001
Copy link
Contributor Author

ah well in this case we aren't in object mode and php7.1 throws up fatal error by us using $this (which doesn't seem to be initilised anyway) and its also a static function.

@eileenmcnaughton
Copy link
Contributor

that seems like a compelling case then!

@eileenmcnaughton eileenmcnaughton merged commit 5223eb2 into civicrm:master Jul 23, 2017
@eileenmcnaughton eileenmcnaughton deleted the CRM-19941 branch July 23, 2017 22:25
@@ -151,7 +151,7 @@ public static function createLinks(&$query, $sortByCharacter, $isDAO) {
$qfKey = CRM_Utils_Array::value('qfKey', $query->_formValues);
}
if (empty($qfKey)) {
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this, FALSE, NULL, $_REQUEST);
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', NULL, FALSE, NULL, $_REQUEST);
Copy link
Member

Choose a reason for hiding this comment

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

@eileenmcnaughton @seamuslee001 this has caused a regression in my local. On visiting 'Manage Event' page it throws:

[24-Jul-2017 18:09:38 Asia/Aden] PHP Fatal error:  Cannot pass parameter 3 by reference in /Users/monish/src/civicrm/CRM/Utils/PagerAToZ.php on line 154

Copy link
Contributor

Choose a reason for hiding this comment

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

@eileenmcnaughton @seamuslee001 I just tested it and got the same error.

  $empty = NULL;
  $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $empty, FALSE, NULL, $_REQUEST);

seems to work, as we are working with a variable and not a constant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@spalmstr i picked up on your fix through #10748 which monish has now merged, Thanks for the pointer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants