Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
[FACTFINDER-132] Fix fatal error when config is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
xpoback committed Dec 4, 2015
1 parent a2e8226 commit 30d0699
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/code/community/Flagbit/FactFinder/Helper/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class Flagbit_FactFinder_Helper_Search extends Mage_Core_Helper_Abstract {
*/
const XML_CONFIG_PATH_PRODUCT_IDENTIFIER = 'factfinder/config/identifier';

const DEFAULT_ENTITY_ID_FIELD_NAME = 'entity_id';

/**
* XML Config Path to Product Identifier Setting
*
Expand Down Expand Up @@ -320,7 +322,7 @@ public function getIdFieldName()
{
$idFieldName = Mage::getStoreConfig(self::XML_CONFIG_PATH_PRODUCT_IDENTIFIER);
if(!$idFieldName){
$idFieldName = $this->getEntity()->getIdFieldName();
$idFieldName = self::DEFAULT_ENTITY_ID_FIELD_NAME;
}
return $idFieldName;
}
Expand Down

0 comments on commit 30d0699

Please sign in to comment.