summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-07-22 15:38:23 +0200
committerBart Visscher <bartv@thisnet.nl>2012-07-22 17:27:30 +0200
commit9e70f64d44f7ffcc03bdbbd8c312b52f97d33c7b (patch)
tree907dfe5ef0457004d67ac962ba66217698df351b /lib
parentb1010160b363223c1e1c1cc7137dfb8e9aa3ab5b (diff)
downloadnextcloud-server-9e70f64d44f7ffcc03bdbbd8c312b52f97d33c7b.tar.gz
nextcloud-server-9e70f64d44f7ffcc03bdbbd8c312b52f97d33c7b.zip
Fix oc-1163: gzdecode function not always defined
This function is only found in newer php versions
Diffstat (limited to 'lib')
-rw-r--r--lib/minimizer.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/minimizer.php b/lib/minimizer.php
index 3bf5ff9980b..3dc89e331a6 100644
--- a/lib/minimizer.php
+++ b/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));
+ }
+}