Hi I have this error Fatal error: Call to a member function getMessage() on a non-object in if ($_POST[pingbot2] == 'YES') { $dataping = array( 'key' => $site['pinglerapi'], 'url' => $data[0][link], 'title' => urlencode($content[title]), 'category_id' => $category_pingler ); pingler($dataping); flush(); ob_flush(); } echo '<div>' . $datasite[$i][url] . ' ... <font color="#FF3333">ล้มเหลว !!</font> | ' . $e->getMessage() . ' |</div>'; flush(); ob_flush(); echo '<div>' . $datasite[$i][url] . ' ... <font color="#FF3333">ล้มเหลว !!</font> | ' . $e->getMessage() . ' |</div>'; flush(); ob_flush(); } break; } PHP: this line: echo '<div>' . $datasite[$i] . ' ... <font color="#FF3333">ลà...e() . ' |</div>'; How can fix it? Thank you
It seems $e is exception object but I see no try - catch block in code / file you provided. Either its written wrong or there is a wrapper within the file where this file is included. Please have a look around and let us know if you find any try catch block. If not, you may opt to remove $e->getMessage() from code above.