Third argument to unpack() requires PHP 7.1
[lhc/web/wiklou.git] / includes / libs / mime / MimeAnalyzer.php
index a2075dc..a326df2 100644 (file)
@@ -806,7 +806,7 @@ EOT;
                if ( $eocdrPos !== false ) {
                        $this->logger->info( __METHOD__ . ": ZIP signature present in $file\n" );
                        // Check if it really is a ZIP file, make sure the EOCDR is at the end (T40432)
-                       $commentLength = unpack( "n", $tail, $eocdrPos + 20 )[0];
+                       $commentLength = unpack( "n", substr( $tail, $eocdrPos + 20 ) )[0];
                        if ( $eocdrPos + 22 + $commentLength !== strlen( $tail ) ) {
                                $this->logger->info( __METHOD__ . ": ZIP EOCDR not at end. Not a ZIP file." );
                        } else {
@@ -1148,7 +1148,7 @@ EOT;
         * distinguish them from MIME types.
         *
         * This function relies on the mapping defined by $this->mMediaTypes
-        * @access private
+        * @private
         * @param string $extMime
         * @return int|string
         */