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

Fix empty url params #349

Merged
merged 3 commits into from
Jul 15, 2019
Merged

Fix empty url params #349

merged 3 commits into from
Jul 15, 2019

Conversation

joshcanhelp
Copy link
Contributor

@joshcanhelp joshcanhelp commented Jul 12, 2019

Changes

Fixed the URL parameter building pipeline to exclude parameters with null or "" values.

References

Fixing issue brought up by #347

Testing

Failing tests for changed functionality.

  • This change adds test coverage
  • This change was developed in PHP 7.1.29

Checklist

  • All existing and new tests complete without errors.

@joshcanhelp joshcanhelp marked this pull request as ready for review July 12, 2019 22:52
@joshcanhelp joshcanhelp requested a review from a team July 12, 2019 22:52
@joshcanhelp joshcanhelp added this to the 5.5.1 milestone Jul 12, 2019
Copy link

@stevehobbsdev stevehobbsdev left a comment

Choose a reason for hiding this comment

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

If it's not already covered, I think an additional test with a mixture of params that have values and params that don't would be useful:

$builder = self::getUrlBuilder();
$builder->withParam('param1', 'value1');
$builder->withParam('param2', null);
$builder->withParam('param3', 'value3');

// Verify that only 1 and 3 are added
$this->assertEquals('?param1=value1&param3=value3', $builder->getParams());

@stevehobbsdev stevehobbsdev self-requested a review July 15, 2019 15:11
@joshcanhelp joshcanhelp merged commit 70f9789 into master Jul 15, 2019
@joshcanhelp joshcanhelp deleted the fix-empty-url-params branch July 15, 2019 15:12
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants