From 31a80b43a6fb1bde22dfb526b10ee35089b96be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 21 Sep 2014 11:52:29 +0300 Subject: [PATCH] if no Cache is defined, create Minify_Cache_Null --- min/lib/Minify.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/min/lib/Minify.php b/min/lib/Minify.php index aa22076..5638366 100644 --- a/min/lib/Minify.php +++ b/min/lib/Minify.php @@ -87,12 +87,15 @@ class Minify { } /** - * Get Minify cache + * Get Minify cache, if no Cache is defined, create Minify_Cache_Null * - * @return Minify_Cache_Abstract|null + * @return Minify_Cache_Abstract */ public static function getCache() { + if (!self::$_cache) { + self::$_cache = new Minify_Cache_Null(); + } return self::$_cache; } @@ -355,7 +358,7 @@ class Minify { ); } } - + /** * Return combined minified content for a set of sources *