1
0
Fork 0

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.

This commit is contained in:
Tobias Hößl 2012-03-03 10:44:34 +00:00
parent 5bb8ed4b8b
commit 02a9fd5dc1

View file

@ -188,7 +188,7 @@ function parse_url_content(&$a) {
if(! $text) { if(! $text) {
logger('parsing meta'); logger('parsing meta');
$items = $domhead->getElementsByTagName('meta'); $items = (isset($domhead) && is_object($domhead) ? $domhead->getElementsByTagName('meta') : null);
if($items) { if($items) {
foreach($items as $item) { foreach($items as $item) {
$property = $item->getAttribute('property'); $property = $item->getAttribute('property');