diff options
author | David Fricker <[email protected]> | 2017-02-04 23:00:17 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2017-02-04 23:00:17 +0000 |
commit | 8bb2fd7c67786ae8d945e1baaeb3dd8d0e9195b1 (patch) | |
tree | ea7eb040aa308479c62f3fba97d2b3bd5197b796 | |
parent | ed77068c961b97911f3470ddec5470d44f57f612 (diff) |
prevents an exception being thrown
prevents an exception being thrown by postProcessContent when $result is a bool not a DOM object.
-rw-r--r-- | src/HTMLParser.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php index a8c28ff..0313b2a 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -183,6 +183,10 @@ class HTMLParser if (!$parseSuccessful) { return false; } + + if (!$result) { + return false; + } $result = $this->postProcessContent($result); |