From feadf51096671671e428cd44baba356bb4e2536c Mon Sep 17 00:00:00 2001 From: "J. King" Date: Tue, 18 Jul 2017 12:52:26 -0400 Subject: [PATCH] Workaround for picoFeed memory leak. Fixes #58 --- lib/Feed.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Feed.php b/lib/Feed.php index 4be63f6..ef2f7a0 100644 --- a/lib/Feed.php +++ b/lib/Feed.php @@ -70,12 +70,16 @@ class Feed { $this->resource->getEncoding() ); $feed = $this->parser->execute(); - + // Grab the favicon for the feed; returns an empty string if it cannot find one. // Some feeds might use a different domain (eg: feedburner), so the site url is // used instead of the feed's url. $this->favicon = (new Favicon)->find($feed->siteUrl); + // work around a PicoFeed memory leak FIXME: remove this hack (or not) once PicoFeed stops leaking memory + libxml_use_internal_errors(false); } catch (PicoFeedException $e) { + // work around a PicoFeed memory leak FIXME: remove this hack (or not) once PicoFeed stops leaking memory + libxml_use_internal_errors(false); throw new Feed\Exception($this->resource->getUrl(), $e); }