From 8ffc0f2fa1a7edea629f87597ad30f5fb2dca813 Mon Sep 17 00:00:00 2001 From: Andres Rey Date: Thu, 11 Jan 2018 20:12:05 +0000 Subject: Apply fixes from StyleCI --- src/Readability.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Readability.php') diff --git a/src/Readability.php b/src/Readability.php index 7160fbe..784d37d 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -131,6 +131,7 @@ class Readability // Checking for minimum HTML to work with. if (!($root = $this->dom->getElementsByTagName('body')->item(0)) || !$root->firstChild) { $this->logger->emergency('No body tag present or body tag empty'); + throw new ParseException('Invalid or incomplete HTML.'); } @@ -176,6 +177,7 @@ class Readability $this->configuration->setCleanConditionally(false); } else { $this->logger->emergency('[Parsing] Could not parse text, giving up :('); + throw new ParseException('Could not parse text.'); } } else { -- cgit v1.2.3