summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-11-15 00:32:33 +0100
committeremkael <emkael@tlen.pl>2018-11-15 00:32:33 +0100
commit738eaca67e73b52bf8253276cdc5920b322ee1d6 (patch)
treed0b45fbc356050ab9fea5bcf2f7adac00e84db57
parent384daa62f4daef2ffead4dc6ab44fec3ca6f248b (diff)
Returning the original file if it's a hollow frame without actual protocol
-rw-r--r--tdd/tdd-bootstrap.php4
1 files changed, 4 insertions, 0 deletions
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();