From: Tobias Hößl Date: Sat, 3 Mar 2012 10:44:34 +0000 (+0000) Subject: A 'PHP Fatal error: Call to a member function getElementsByTagName() on a non-object... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=02a9fd5dc1d1d9e848e2f406f2e13c4cf0ce228b;p=friendica.git A 'PHP Fatal error: Call to a member function getElementsByTagName() on a non-object in mod/parse_url.php on line 191' occurred when the linked HTML-File doesn't have a HEAD. The HTML-file couln't be link to in the editor therefore. --- diff --git a/mod/parse_url.php b/mod/parse_url.php index e0b378f685..27dac4d5d3 100755 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -188,7 +188,7 @@ function parse_url_content(&$a) { if(! $text) { logger('parsing meta'); - $items = $domhead->getElementsByTagName('meta'); + $items = (isset($domhead) && is_object($domhead) ? $domhead->getElementsByTagName('meta') : null); if($items) { foreach($items as $item) { $property = $item->getAttribute('property');