From 738eaca67e73b52bf8253276cdc5920b322ee1d6 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 15 Nov 2018 00:32:33 +0100 Subject: Returning the original file if it's a hollow frame without actual protocol --- tdd/tdd-bootstrap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tdd/tdd-bootstrap.php b/tdd/tdd-bootstrap.php index 551c9ed..b6de1c0 100644 --- a/tdd/tdd-bootstrap.php +++ b/tdd/tdd-bootstrap.php @@ -71,6 +71,10 @@ class Protocol { $content = file_get_contents($this->get_filename()); $dom = str_get_html($content); + if (!count($dom->find('h4'))) { + echo $content; + return; + } $header_td1 = $dom->find('/html/body/table/tr/td[class="bdcc12"]', 0); $header_tr = $header_td1->parent; $tr = @$header_tr->next_sibling(); -- cgit v1.2.3