<?php
+/**
+ * 7z stream wrapper
+ *
+ * @file
+ * @ingroup Maintenance
+ */
+
/**
* Stream wrapper around 7za filter program.
* Required since we can't pass an open file resource to XMLReader->open()
// Suppress the stupid messages on stderr
$command .= ' 2>/dev/null';
}
- $this->stream = popen( $command, $mode );
+ $this->stream = popen( $command, $mode[0] ); // popen() doesn't like two-letter modes
return ( $this->stream !== false );
}
return fseek( $this->stream, $offset, $whence );
}
}
-stream_wrapper_register( 'mediawiki.compress.7z', 'SevenZipStream' );
\ No newline at end of file
+stream_wrapper_register( 'mediawiki.compress.7z', 'SevenZipStream' );