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

PaymentMethodRepository : check if array key exists before checking if value is false #4119

Merged
merged 1 commit into from
Feb 12, 2016

Conversation

axelvnk
Copy link

@axelvnk axelvnk commented Feb 11, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #4118
License MIT

@@ -26,7 +26,7 @@ public function getQueryBuidlerForChoiceType(array $options)
{
$queryBuilder = $this->getCollectionQueryBuilder();

if (!$options['disabled']) {
if (array_key_exists('disabled', $options) && !$options['disabled']) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use isset($options['disabled'])

@@ -26,7 +26,7 @@ public function getQueryBuidlerForChoiceType(array $options)
{
$queryBuilder = $this->getCollectionQueryBuilder();

if (!$options['disabled']) {
if (isset($options['disabled']) && !$options['disabled']) {
$queryBuilder->where('method.enabled = true');
Copy link
Author

Choose a reason for hiding this comment

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

michalmarcinkowski added a commit that referenced this pull request Feb 12, 2016
PaymentMethodRepository : check if array key exists before checking if value is false
@michalmarcinkowski michalmarcinkowski merged commit fe866e0 into Sylius:master Feb 12, 2016
@michalmarcinkowski
Copy link
Contributor

Thanks Axel! 👍

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.

2 participants