If the album_cover_item_id points to a missing item (unlikely but possible) just treat it like it was missing and continue

This commit is contained in:
Bharat Mediratta
2009-02-22 23:54:48 +00:00
parent 3a8439d7b5
commit ffbab952c6
+6 -1
View File
@@ -275,7 +275,12 @@ class Item_Model extends ORM_MPTT {
return null;
}
return model_cache::get("item", $this->album_cover_item_id);
try {
return model_cache::get("item", $this->album_cover_item_id);
} catch (Exception $e) {
// It's possible (unlikely) that the item was deleted, if so keep going.
return null;
}
}
/**