Index: trunk/phase3/includes/HTMLFileCache.php |
— | — | @@ -159,16 +159,12 @@ |
160 | 160 | wfMkdirParents( $mydir2 ); |
161 | 161 | } |
162 | 162 | |
163 | | - public function saveToFileCache( $origtext ) { |
| 163 | + public function saveToFileCache( $text ) { |
164 | 164 | global $wgUseFileCache; |
165 | | - if( !$wgUseFileCache ) { |
166 | | - return $origtext; // return to output |
| 165 | + if( !$wgUseFileCache || strlen( $text ) < 512 ) { |
| 166 | + // Disabled or empty/broken output (OOM and PHP errors) |
| 167 | + return $text; |
167 | 168 | } |
168 | | - $text = $origtext; |
169 | | - // Empty? |
170 | | - if( strcmp($text,'') == 0 ) return ''; |
171 | | - // Probably broken? (OOM and PHP errors) |
172 | | - if( mb_strlen($text) < 512 ) return $origtext; |
173 | 169 | |
174 | 170 | wfDebug(" saveToFileCache()\n", false); |
175 | 171 | |