summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-09-29 18:15:42 +0200
committerAndreas Gohr <andi@splitbrain.org>2014-09-29 18:15:42 +0200
commita8a18248934225d10e98805150c56083a850877f (patch)
treec49e698defbde4251cc676c5887a0b595be19bc8 /inc
parent07a1dd10b8b570789d74054892a20c952ee99e54 (diff)
parent92b9f19672bc9424b0bd0bdd7457d7a850f5ea90 (diff)
downloadrpg-a8a18248934225d10e98805150c56083a850877f.tar.gz
rpg-a8a18248934225d10e98805150c56083a850877f.tar.bz2
Merge branch 'bug865'
* bug865: work around missing gzopen on certain systems #865
Diffstat (limited to 'inc')
-rw-r--r--inc/compatibility.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/inc/compatibility.php b/inc/compatibility.php
index ae780e5ac..2738c9bb1 100644
--- a/inc/compatibility.php
+++ b/inc/compatibility.php
@@ -33,4 +33,20 @@ if(!function_exists('ctype_digit')) {
if(preg_match('/^\d+$/', $text)) return true;
return false;
}
+}
+
+if(!function_exists('gzopen') && function_exists('gzopen64')) {
+ /**
+ * work around for PHP compiled against certain zlib versions #865
+ *
+ * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists
+ *
+ * @param string $filename
+ * @param string $mode
+ * @param int $use_include_path
+ * @return mixed
+ */
+ function gzopen($filename, $mode, $use_include_path = 0) {
+ return gzopen64($filename, $mode, $use_include_path);
+ }
} \ No newline at end of file