diff --git a/Entities/Model/ResourceModel/Entities.php b/Entities/Model/ResourceModel/Entities.php index b01d832..78b1a82 100644 --- a/Entities/Model/ResourceModel/Entities.php +++ b/Entities/Model/ResourceModel/Entities.php @@ -464,6 +464,7 @@ public function getAttribute($code, $entityTypeId) { $connection = $this->getConnection(); + /** @var array $attribute */ $attribute = $connection->fetchRow( $connection->select() ->from($this->getTable('eav_attribute'), array('attribute_id', 'backend_type')) @@ -471,7 +472,12 @@ public function getAttribute($code, $entityTypeId) ->where('attribute_code = ?', $code) ->limit(1) ); - return count($attribute) ? $attribute : false; + + if (empty($attribute)) { + return false; + } + + return $attribute; } /**