mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-09-23 10:21:45 +00:00
Add fallback for gzdecode (only exists in PHP >= 5.4.0)
Bug: 54058 Change-Id: I62a843aec4657a3d4895d34535cc2be42d4552fd
This commit is contained in:
parent
db3d942b69
commit
0e4339da86
|
@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue