I am validating an extension using ECG Sniffs and I get a warning
'getFirstItem does not limit the result of collection load to one item
Here is how I am trying to get default configured website.
$websites = Mage::getModel('core/website') ->getCollection() ->addFieldToFilter('is_default', 1); $website = $websites->getFirstItem();
Here I try to replace
$websites->getSelect()->limit() as per a suggestion but it gives another warning
Data access method LIMIT detected outside of Resource Model
Can anybody please help me how to fix the warning?
P.S. I am neither magento nor PHP developer.