StringUtils: Clarify that isValidRegex is for PCRE regexps
[lhc/web/wiklou.git] / includes / utils / ZipDirectoryReader.php
index 46f1aaa..4207d41 100644 (file)
@@ -228,7 +228,9 @@ class ZipDirectoryReader {
                $this->eocdr['EOCDR size'] = $structSize + $this->eocdr['file comment length'];
 
                if ( $structSize + $this->eocdr['file comment length'] != strlen( $block ) - $sigPos ) {
-                       $this->error( 'zip-bad', 'trailing bytes after the end of the file comment' );
+                       // T40432: MS binary documents frequently embed ZIP files
+                       $this->error( 'zip-wrong-format', 'there is a ZIP signature but it is not at ' .
+                               'the end of the file. It could be an OLE file with a ZIP file embedded.' );
                }
                if ( $this->eocdr['disk'] !== 0
                        || $this->eocdr['CD start disk'] !== 0
@@ -367,6 +369,7 @@ class ZipDirectoryReader {
         * Read the central directory at the given location
         * @param int $offset
         * @param int $size
+        * @suppress PhanTypeInvalidLeftOperandOfIntegerOp
         */
        function readCentralDirectory( $offset, $size ) {
                $block = $this->getBlock( $offset, $size );