diff --git a/inc/compatibility.php b/inc/compatibility.php index ae780e5ac88fa3ca26d6408d8b766e967674db43..2738c9bb10ec77921cf1cbf68ea7071d7e9dc531 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