correct DOM node list access

This commit is contained in:
oliver 2015-08-20 13:56:19 +02:00
parent 136afff5f1
commit fc587be483

View file

@ -124,7 +124,7 @@
foreach($dom->getElementsByTagName('a') as $link) {
$link->setAttribute('target', '_blank');
}
$body = $dom->getElementsByTagName('body')[0];
$body = $dom->getElementsByTagName('body')->item(0);
$string = $dom->saveHTML($body);
return trim(substr($string, 6, strlen($string) - 13));