Rename some DB/LB variables to be more consistent
[lhc/web/wiklou.git] / includes / MimeMagic.php
index aedfd8f..a432d44 100644 (file)
@@ -645,7 +645,7 @@ class MimeMagic {
                        throw new MWException(
                                "Seeking $tailLength bytes from EOF failed in " . __METHOD__ );
                }
-               $tail = fread( $f, $tailLength );
+               $tail = $tailLength ? fread( $f, $tailLength ) : '';
                fclose( $f );
 
                wfDebug( __METHOD__ . ": analyzing head and tail of $file for magic numbers.\n" );