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

magento/magento2: #8765 #8778

Merged
merged 5 commits into from
Mar 22, 2017
Merged

magento/magento2: #8765 #8778

merged 5 commits into from
Mar 22, 2017

Conversation

cavalier79
Copy link

@cavalier79 cavalier79 commented Mar 3, 2017

M2.1.4 : Magento\Catalog\Model\ResourceModel\AbstractResource::getAttributeRawValue() returns false negative

  • fixed adding a strong check validation on return value.

Nino Aratari added 3 commits March 2, 2017 15:47
…nfig\SourceFactory::create() method is wrong

Fixed type in return comment
A PHPDoc comment for \Magento\Config\Model\Config\SourceFactory::create() method is wrong
The correct return parameter is  \Magento\Framework\Option\ArrayInterface
Magento\Catalog\Model\ResourceModel\AbstractResource::getAttributeRawValue() returns false negative
- fixed adding a strong check on return value
@@ -568,6 +568,6 @@ public function getAttributeRawValue($entityId, $attribute, $store)
$attributesData = $_data[1];
}

return $attributesData ? $attributesData : false;
return $attributesData!==false ? $attributesData : false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add spaces around binary operator.

Also, as to me this statement would be less confusing if you invert condition (=== false and swap ternary operator parts).

Magento\Catalog\Model\ResourceModel\AbstractResource::getAttributeRawValue() returns false negative
- fixed adding a strong check on return value
@@ -568,6 +568,6 @@ public function getAttributeRawValue($entityId, $attribute, $store)
$attributesData = $_data[1];
}

return $attributesData ? $attributesData : false;
return $attributesData === false ? false: $attributesData;
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! Just one more space in false: left to add :)

It would be really nice if you squash all changes into one commit and force push into the same branch, but I do not insist on this.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.. but i've still have some problem with squash :D

@orlangur orlangur mentioned this pull request Mar 3, 2017
Magento\Catalog\Model\ResourceModel\AbstractResource::getAttributeRawValue() returns false negative
- fixed adding a strong check on return value
@maghamed maghamed self-requested a review March 6, 2017 09:46
@maghamed maghamed self-assigned this Mar 6, 2017
@maghamed maghamed added this to the March 2017 milestone Mar 22, 2017
@magento-team magento-team merged commit d82825f into magento:develop Mar 22, 2017
magento-team pushed a commit that referenced this pull request Mar 22, 2017
@vrann
Copy link
Contributor

vrann commented Mar 22, 2017

@cavalier79 Thank you, accepted.

@cavalier79 cavalier79 deleted the fix8765 branch March 23, 2017 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants