From a5338a7ada6e5c029bc3e70200eb633a94b852d3 Mon Sep 17 00:00:00 2001 From: Andres Rey Date: Thu, 30 Nov 2017 23:57:12 +0000 Subject: Remove configuration setting from the __construct --- src/Readability.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Readability.php b/src/Readability.php index c42e577..b149f96 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -110,9 +110,6 @@ class Readability public function __construct(Configuration $configuration) { $this->configuration = $configuration; - - // To avoid having a gazillion of errors on malformed HTMLs - libxml_use_internal_errors(true); } /** @@ -201,6 +198,9 @@ class Readability */ private function loadHTML($html) { + // To avoid having a gazillion of errors on malformed HTMLs + libxml_use_internal_errors(true); + $dom = new DOMDocument('1.0', 'utf-8'); if (!$this->configuration->getSubstituteEntities()) { -- cgit v1.2.3