Skip to content

Commit 188de08

Browse files
committed
fix
1 parent f76955b commit 188de08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -635,19 +635,19 @@ public function joinAttribute($alias, $attribute, $bind, $filter = null, $joinTy
635635
}
636636

637637
// cache entity
638-
if (!isset($this->_joinEntities[$entity->getType()])) {
638+
if (isset($entity) && !isset($this->_joinEntities[$entity->getType()])) {
639639
$this->_joinEntities[$entity->getType()] = $entity;
640640
}
641641

642642
// validate attribute
643-
if (is_string($attribute)) {
643+
if (isset($entity) && is_string($attribute)) {
644644
$attribute = $entity->getAttribute($attribute);
645645
}
646646
if (!$attribute) {
647647
throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Invalid attribute type'));
648648
}
649649

650-
if (empty($filter)) {
650+
if (isset($entity) && empty($filter)) {
651651
$filter = $entity->getEntityIdField();
652652
}
653653

0 commit comments

Comments
 (0)