Skip to content

Commit

Permalink
Fix return type on the cart price rule creation BO page:
Browse files Browse the repository at this point in the history
Type Error occurred when creating object: Magento\SalesRule\Model\Rule\Condition\Product\Interceptor, Smile\CustomEntityProductLink\Plugin\Model\ResourceModel\Eav\Attribute::afterIsAllowedForRuleCondition(): Return value must be of type bool, string returned
  • Loading branch information
maximequeneau authored and guvra committed Jan 9, 2024
1 parent d0bc483 commit 2eb6b3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Plugin/Model/ResourceModel/Eav/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Attribute
*/
public function afterIsAllowedForRuleCondition(Subject $subject, bool $result): bool
{
if ($subject->getFrontendInput() == 'smile_custom_entity') {
$result = $subject->getIsVisible();
if ($subject->getFrontendInput() === 'smile_custom_entity') {
$result = (bool) $subject->getIsVisible();
}

return $result;
Expand Down

0 comments on commit 2eb6b3f

Please sign in to comment.