Fix oc-1163: gzdecode function not always defined

This function is only found in newer php versions
remotes/origin/stable45
Bart Visscher 13 years ago
parent b1010160b3
commit 9e70f64d44
  1. 10
      lib/minimizer.php

@ -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…
Cancel
Save