Commit 59d0ccaf authored by Colin Mollenhour's avatar Colin Mollenhour

Prevent fatal error when indexer is not present.

parent fba07462
...@@ -57,10 +57,11 @@ abstract class EcomDev_PHPUnit_Model_Mysql4_Fixture_Eav_Abstract ...@@ -57,10 +57,11 @@ abstract class EcomDev_PHPUnit_Model_Mysql4_Fixture_Eav_Abstract
if (empty($this->_options['doNotIndexAll'])) { if (empty($this->_options['doNotIndexAll'])) {
$indexer = Mage::getSingleton('index/indexer'); $indexer = Mage::getSingleton('index/indexer');
foreach ($this->getRequiredIndexers() as $indexerCode) { foreach ($this->getRequiredIndexers() as $indexerCode) {
if (empty($this->_options['doNotIndex']) if (empty($this->_options['doNotIndex']) || !in_array($indexerCode, $this->_options['doNotIndex'])) {
|| !in_array($indexerCode, $this->_options['doNotIndex'])) { $process = $indexer->getProcessByCode($indexerCode);
$indexer->getProcessByCode($indexerCode) if ($process) {
->reindexAll(); $process->reindexAll();
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment