Browse Source

Catch errors that now appear. (WIP)

undefined
Gerben 4 years ago
parent
commit
36e73a314b
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      lib/Controller/MementoFinder.php

+ 1
- 0
lib/Controller/MementoFinder.php View File

@@ -182,6 +182,7 @@ function extractMementoInfo($file) {
$content = $file->getContent();
$DOM = new DOMDocument;
$DOM->loadHTML($content);
if (!$DOM->documentElement) return null; // possibly $content was not HTML at all.
$headElement = $DOM->documentElement->getElementsByTagName('head')[0];
if (!$headElement) return null; // possibly $content was not HTML at all.
$originalUrls = getOriginalUrls($headElement);


Loading…
Cancel
Save