diff options
author | Guy Brand <gb@unistra.fr> | 2015-08-10 10:03:27 +0200 |
---|---|---|
committer | Guy Brand <gb@unistra.fr> | 2015-08-10 10:03:27 +0200 |
commit | 53a57d16b9c741bb44099fd93bf79efa06796341 (patch) | |
tree | 24a90a50afe9325926c8ebaa2ed90f9fa093e5b9 /inc/compatibility.php | |
parent | cf6e6645c31a9f185cef3fb9452fb188882ede47 (diff) | |
parent | a060d9973e7c1d5051f2cc426937881826e4972e (diff) | |
download | rpg-53a57d16b9c741bb44099fd93bf79efa06796341.tar.gz rpg-53a57d16b9c741bb44099fd93bf79efa06796341.tar.bz2 |
Merge branch master into stable
Diffstat (limited to 'inc/compatibility.php')
-rw-r--r-- | inc/compatibility.php | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/inc/compatibility.php b/inc/compatibility.php index 2738c9bb1..cb865a2d7 100644 --- a/inc/compatibility.php +++ b/inc/compatibility.php @@ -41,12 +41,42 @@ if(!function_exists('gzopen') && function_exists('gzopen64')) { * * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists * - * @param string $filename - * @param string $mode - * @param int $use_include_path + * @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); } +} + +if(!function_exists('gzseek') && function_exists('gzseek64')) { + /** + * work around for PHP compiled against certain zlib versions #865 + * + * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists + * + * @param resource $zp + * @param int $offset + * @param int $whence + * @return int + */ + function gzseek($zp, $offset, $whence = SEEK_SET) { + return gzseek64($zp, $offset, $whence); + } +} + +if(!function_exists('gztell') && function_exists('gztell64')) { + /** + * work around for PHP compiled against certain zlib versions #865 + * + * @link http://stackoverflow.com/questions/23417519/php-zlib-gzopen-not-exists + * + * @param resource $zp + * @return int + */ + function gztell($zp) { + return gztell64($zp); + } }
\ No newline at end of file |