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
if (empty($this->_options['doNotIndexAll'])) {
$indexer = Mage::getSingleton('index/indexer');
foreach ($this->getRequiredIndexers() as $indexerCode) {
if (empty($this->_options['doNotIndex'])
|| !in_array($indexerCode, $this->_options['doNotIndex'])) {
$indexer->getProcessByCode($indexerCode)
->reindexAll();
if (empty($this->_options['doNotIndex']) || !in_array($indexerCode, $this->_options['doNotIndex'])) {
$process = $indexer->getProcessByCode($indexerCode);
if ($process) {
$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