Fix oc-1163: gzdecode function not always defined
This function is only found in newer php versions
This commit is contained in:
parent
b1010160b3
commit
9e70f64d44
|
@ -46,3 +46,13 @@ abstract class OC_Minimizer {
|
|||
echo $out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('gzdecode')) {
|
||||
function gzdecode($data,$maxlength=null,&$filename='',&$error='')
|
||||
{
|
||||
if (strcmp(substr($data,0,9),"\x1f\x8b\x8\0\0\0\0\0\0")) {
|
||||
return null; // Not the GZIP format we expect (See RFC 1952)
|
||||
}
|
||||
return gzinflate(substr($data,10,-8));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue