make gzopen() portable by using binary flag
authorAntoine Musso <hashar@users.mediawiki.org>
Wed, 8 Feb 2012 07:03:20 +0000 (07:03 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Wed, 8 Feb 2012 07:03:20 +0000 (07:03 +0000)
r110871 forgot the 'b' flag which make sure gzopen handle file
content in binary form. That is for portability accross platforms.

includes/cache/FileCacheBase.php

index 29cc8a1..3740165 100644 (file)
@@ -117,7 +117,7 @@ abstract class FileCacheBase {
         */
        public function fetchText() {
                // gzopen can transparently read from gziped or plain text
-               $fh = gzopen( $this->cachePath(), 'r' );
+               $fh = gzopen( $this->cachePath(), 'rb' );
                return stream_get_contents( $fh );
        }