diff options
author | Aaron Schulz <aaron@users.mediawiki.org> | 2009-02-17 15:05:23 +0000 |
---|---|---|
committer | Aaron Schulz <aaron@users.mediawiki.org> | 2009-02-17 15:05:23 +0000 |
commit | 8d2c4c501955ab35305abb62506faddc1ddac34f (patch) | |
tree | afce0dfd198c1318ce98a15161327d6550192e15 /includes/HTMLFileCache.php | |
parent | 8653947b065aa57164a38fb5d4cdf0e1b8717f70 (diff) | |
download | mediawikicore-8d2c4c501955ab35305abb62506faddc1ddac34f.tar.gz mediawikicore-8d2c4c501955ab35305abb62506faddc1ddac34f.zip |
Try to avoid file caching php fatals, it's very annoying
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/47361
Diffstat (limited to 'includes/HTMLFileCache.php')
-rw-r--r-- | includes/HTMLFileCache.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/HTMLFileCache.php b/includes/HTMLFileCache.php index e267962c58db..ce4c11a57adb 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); |