From 8faf38a084e6bb5b177e3b64374b7b1a4ec6b97e Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Sat, 10 Aug 2019 02:39:26 -0500 Subject: [PATCH] unset variable instead of allocate empty string (thanks scrutinizer) This reverts commit f10451b8adc798056e8fb528dc934d9fba5c1118. --- src/PackageReader/AbstractPackageReader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PackageReader/AbstractPackageReader.php b/src/PackageReader/AbstractPackageReader.php index 5cc7d50..3662fd5 100644 --- a/src/PackageReader/AbstractPackageReader.php +++ b/src/PackageReader/AbstractPackageReader.php @@ -107,7 +107,7 @@ public function fileContents() $contents = $this->zip->getFromName($filename); if (false === $contents || ! $this->filterContents($contents)) { - $contents = ''; + unset($contents); // release memory as it was filtered continue; // did not pass the filename filter }