MarkAHershberger has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/52937


Change subject: 1379b783 was missed before 1.19 came out and causes problem for 
php without zlib.
......................................................................

1379b783 was missed before 1.19 came out and causes problem for php
without zlib.

Bug: 45903
Change-Id: I4213401502584dcc49339c6a32e92a5d49e4ab47
---
M includes/cache/FileCacheBase.php
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/52937/1

diff --git a/includes/cache/FileCacheBase.php b/includes/cache/FileCacheBase.php
index 3740165..c6150c7 100644
--- a/includes/cache/FileCacheBase.php
+++ b/includes/cache/FileCacheBase.php
@@ -116,9 +116,12 @@
         * @return string
         */
        public function fetchText() {
-               // gzopen can transparently read from gziped or plain text
-               $fh = gzopen( $this->cachePath(), 'rb' );
-               return stream_get_contents( $fh );
+               if( $this->useGzip() ) {
+                       $fh = gzopen( $this->cachePath(), 'rb' );
+                       return stream_get_contents( $fh );
+               } else {
+                       return file_get_contents( $this->cachePath() );
+               }
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/52937
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4213401502584dcc49339c6a32e92a5d49e4ab47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_19
Gerrit-Owner: MarkAHershberger <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to