title: getID() on a non-object
body: <p>When I visit a page using the magentoshop; I get this errormessage:</p>
  
  <p>Call to a member function getId() on a non-object in <b>/xxxxx/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php</b> on line <b>85</b><br /></p>
  
  <p>I headed for that line, it's a part of a function called getTotalConfigurableItemsPrice.
  It's in a foreach:</p>
  
  <p>And it says:</p>
  
  <pre><code>foreach ($attributes as $attribute) {
      $attributeId = $attribute-&gt;getProductAttribute()-&gt;getId();
  </code></pre>
  
  <p>And the attribute stuff is the problem.
  I tried a var_dump() on $attribute->getProductAttribute()
  and recieved NULL
  A var_dump on($attribute) shows i.e.</p>
  
  <pre><code>["_data":protected]=&gt;
    array(5) {
      ["product_super_attribute_id"]=&gt;
      string(4) "3845"
      ["product_id"]=&gt;
      string(8) "10001563"
      ["attribute_id"]=&gt;
      string(3) "135"
      ["position"]=&gt;
      string(1) "0"
      ["product_attribute"]=&gt;
      NULL
    }
  </code></pre>
  
  <p>What's wrong with the attribute and how can I fix it ?
  If I say:</p>
  
  <pre><code>$attributeId = 1234;
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>$attributeId = $attribute-&gt;getProductAttribute()-&gt;getId();
  </code></pre>
  
  <p>The error is gone, but I need true values ..</p>