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.
However, I noticed that my error log is full of these lines:
[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
What I have checked for:
simple_html_dom_parser
is already included and this function that Line 71 intend to do is working.
Here is Line 71 of my code:
$content->find('a.openevent', 0)->innertext = '';
so its confusing as to what is causing this error to appear in my error log file?
Edit: here is the full code:
<?php
$url = "static/" . $cat_map[$cat]['url'];
$html = file_get_html($url);
$content = $html->find('div#event-pane > div#e' . $event_id, 0);
$content->find('a.openevent', 0)->innertext = '';
$content->find('h3.lshtitle', 0)->onclick = '';
$content->find('h3.lshtitle', 0)->tag = 'div';
$content->find('div.lshtitle', 0)->class = 'ttl';
?>