diff options
Diffstat (limited to 'lib/contents.php')
-rw-r--r-- | lib/contents.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/contents.php b/lib/contents.php index 893a3512..cc9542a9 100644 --- a/lib/contents.php +++ b/lib/contents.php @@ -142,7 +142,6 @@ function getContents( * when returning plaintext. * @param string $defaultSpanText Specifies the replacement text for `<span />` * tags when returning plaintext. - * @return false|simple_html_dom Contents as simplehtmldom object. */ function getSimpleHTMLDOM( $url, @@ -154,11 +153,12 @@ function getSimpleHTMLDOM( $stripRN = true, $defaultBRText = DEFAULT_BR_TEXT, $defaultSpanText = DEFAULT_SPAN_TEXT -) { +): \simple_html_dom { $html = getContents($url, $header ?? [], $opts ?? []); if ($html === '') { throw new \Exception('Unable to parse dom because the http response was the empty string'); } + return str_get_html( $html, $lowercase, |