From: Aaron Schulz Date: Tue, 17 Feb 2009 15:05:23 +0000 (+0000) Subject: Try to avoid file caching php fatals, it's very annoying X-Git-Tag: 1.31.0-rc.0~42853 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=8d2c4c501955ab35305abb62506faddc1ddac34f;p=lhc%2Fweb%2Fwiklou.git Try to avoid file caching php fatals, it's very annoying --- 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);