title: PHP Fatal error: Call to a member function find() on a non-object however my function work
body: <p>I am getting this error on Line 71 of my code, however the function of this line is executed correctly and it does what I expect it to do.</p>
  
  <p>However, I noticed that my error log is full of these lines:</p>
  
  <blockquote>
    <p>[09-Dec-2013 14:54:02 UTC] PHP Fatal error:  Call to a member function find() on a non-object in /home/sportve/public_html/open_event_common.php on line 71</p>
  </blockquote>
  
  <p>What I have checked for:</p>
  
  <p><code>simple_html_dom_parser</code> is already included and this function that Line 71 intend to do is working.</p>
  
  <p>Here is Line 71 of my code:</p>
  
  <pre><code>$content-&gt;find('a.openevent', 0)-&gt;innertext = '';
  </code></pre>
  
  <p>so its confusing as to what is causing this error to appear in my error log file?</p>
  
  <p>Edit: here is the full code:</p>
  
  <pre><code>&lt;?php       
      $url = "static/" . $cat_map[$cat]['url'];
      $html = file_get_html($url);
      $content = $html-&gt;find('div#event-pane &gt; div#e' . $event_id, 0);
      $content-&gt;find('a.openevent', 0)-&gt;innertext = '';
      $content-&gt;find('h3.lshtitle', 0)-&gt;onclick = '';
      $content-&gt;find('h3.lshtitle', 0)-&gt;tag = 'div';
      $content-&gt;find('div.lshtitle', 0)-&gt;class = 'ttl';                
  ?&gt;
  </code></pre>