Skip to content

Instantly share code, notes, and snippets.

@danslo
Created August 19, 2013 11:59
Show Gist options
  • Save danslo/6268385 to your computer and use it in GitHub Desktop.
Save danslo/6268385 to your computer and use it in GitHub Desktop.
<?php
require_once 'app/Mage.php';
Mage::init();
$attributes = Mage::getModel('eav/entity_attribute')->getCollection()
->addFieldToFilter('source_model', array('notnull' => true))
->addFieldToFilter('source_model', array('neq' => ''));
foreach ($attributes as $attribute) {
$model = Mage::getModel($attribute->getSourceModel());
if (!$model) {
printf("Attribute '%s' has an invalid source_model\n", $attribute->getAttributeCode());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment