-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Remove $_REQUEST passed into CRM_Utils_Request::retrieve NFC #17377
Remove $_REQUEST passed into CRM_Utils_Request::retrieve NFC #17377
Conversation
(Standard links)
|
@@ -30,7 +30,7 @@ public function buildQuickForm() { | |||
public static function commonBuildQuickForm($self) { | |||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $self); | |||
if (!$contactId) { | |||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, NULL, $_REQUEST); | |||
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive'); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this code even do?
Line 31 fetches 'cid' from POST, failing that, GET, failing that from $self->get('cid')
.
Then if that fails, we try again, but without $self->get('cid')
? But we know that will yield the same results anyway, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These four lines starting with if (!$contactId) {
look pointless to me.
2499a0c
to
ab6f007
Compare
I've done more of a clean up, removing other default params. |
@artfulrobot There is now a test failure, I don't know if it is related? |
Interesting, I'll take a look |
Jenkins please test this. (that failed test passes repeatably on my buildkit) |
@artfulrobot Still failing :-( |
What do you do when you can't reproduce a test fail locally?! Any tips? |
ab6f007
to
1be22cf
Compare
Jenkins please test this. If at first you don't succeed, try try again... |
Let's merge this quick before it fails again ;-) |
This is a subset of #17324
This PR only contains such changes and as a result should make no difference; it's a NFC