From c5c89de29dc3ccd51509626bd171ac91265f9d09 Mon Sep 17 00:00:00 2001 From: Krzysztof Pyrzyk Date: Tue, 17 Apr 2018 10:58:13 +0200 Subject: [PATCH] Fix fatal error when no cache provided in constructor --- src/CssFromHTMLExtractor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CssFromHTMLExtractor.php b/src/CssFromHTMLExtractor.php index 8b99c89..e519ebe 100644 --- a/src/CssFromHTMLExtractor.php +++ b/src/CssFromHTMLExtractor.php @@ -56,7 +56,7 @@ public function __construct(Cache $resultCache = null) $this->cssConverter = new CssSelectorConverter(); $this->resultCache = is_null($resultCache) ? new ArrayCache() : $resultCache; - $this->cachedRules = (array)$resultCache->fetch('cachedRules'); + $this->cachedRules = (array)$this->resultCache->fetch('cachedRules'); } public function getCssStore()