From 8d2c4c501955ab35305abb62506faddc1ddac34f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 17 Feb 2009 15:05:23 +0000 Subject: [PATCH] Try to avoid file caching php fatals, it's very annoying --- includes/HTMLFileCache.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/HTMLFileCache.php b/includes/HTMLFileCache.php index e267962c58..ce4c11a57a 100644 --- a/includes/HTMLFileCache.php +++ b/includes/HTMLFileCache.php @@ -165,7 +165,10 @@ class HTMLFileCache { return $origtext; // return to output } $text = $origtext; + // Empty? if( strcmp($text,'') == 0 ) return ''; + // Probably broken? (OOM and PHP errors) + if( mb_strlen($text) < 512 ) return $origtext; wfDebug(" saveToFileCache()\n", false); -- 2.20.1