dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
1617e78
)
Merge "MimeMagic: Prevent PHP warning when trying to read zero bytes"
author
jenkins-bot
<jenkins-bot@gerrit.wikimedia.org>
Thu, 24 Mar 2016 10:33:23 +0000
(10:33 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Thu, 24 Mar 2016 10:33:23 +0000
(10:33 +0000)
includes/MimeMagic.php
patch
|
blob
|
history
diff --git
a/includes/MimeMagic.php
b/includes/MimeMagic.php
index
aedfd8f
..
a432d44
100644
(file)
--- a/
includes/MimeMagic.php
+++ b/
includes/MimeMagic.php
@@
-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" );