title: Magento code error
body: <p>when we add to cart then site is not working and when we back to page then it shows 1 item to cart with blank page and  when we flush cache of browser then site is working properly. 
  when we check error in <em>error_log</em> page the it shows</p>
  
  <p><strong>PHP Fatal error</strong>:  </p>
  
  <pre><code>Call to a member function getBackend() on a non-object in
  /var/www/html/thetyrecottage/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php
  on line 2013
  </code></pre>
  
  <p>and the code is   </p>
  
  <pre><code>$backend = $attribute-&gt;getBackend();
  </code></pre>