Add fallback for gzdecode (only exists in PHP >= 5.4.0)

Bug: 54058
Change-Id: I62a843aec4657a3d4895d34535cc2be42d4552fd
This commit is contained in:
Reedy 2013-09-12 04:52:13 +01:00
parent db3d942b69
commit 0e4339da86

View file

@ -48,3 +48,11 @@ $wgResourceModules['ext.templateData'] = array(
'localBasePath' => $dir,
'remoteExtPath' => 'TemplateData',
);
// gzdecode function only exists in PHP >= 5.4.0
// http://php.net/manual/en/function.gzdecode.php
if ( !function_exists( 'gzdecode' ) ) {
function gzdecode( $data ) {
return gzinflate( substr( $data, 10, -8 ) );
}
}