dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Globally unsuppress phan issues with low count
[lhc/web/wiklou.git]
/
includes
/
media
/
GIFMetadataExtractor.php
diff --git
a/includes/media/GIFMetadataExtractor.php
b/includes/media/GIFMetadataExtractor.php
index
ac5fc81
..
4e5c4ea
100644
(file)
--- a/
includes/media/GIFMetadataExtractor.php
+++ b/
includes/media/GIFMetadataExtractor.php
@@
-161,9
+161,9
@@
class GIFMetadataExtractor {
UtfNormal\Validator::quickIsNFCVerify( $dataCopy );
if ( $dataCopy !== $data ) {
UtfNormal\Validator::quickIsNFCVerify( $dataCopy );
if ( $dataCopy !== $data ) {
-
MediaWiki
\suppressWarnings();
+
Wikimedia
\suppressWarnings();
$data = iconv( 'windows-1252', 'UTF-8', $data );
$data = iconv( 'windows-1252', 'UTF-8', $data );
-
MediaWiki
\restoreWarnings();
+
Wikimedia
\restoreWarnings();
}
$commentCount = count( $comment );
}
$commentCount = count( $comment );
@@
-264,7
+264,7
@@
class GIFMetadataExtractor {
*/
static function readGCT( $fh, $bpp ) {
if ( $bpp > 0 ) {
*/
static function readGCT( $fh, $bpp ) {
if ( $bpp > 0 ) {
- $max =
pow( 2, $bpp )
;
+ $max =
2 ** $bpp
;
for ( $i = 1; $i <= $max; ++$i ) {
fread( $fh, 3 );
}
for ( $i = 1; $i <= $max; ++$i ) {
fread( $fh, 3 );
}
@@
-282,6
+282,7
@@
class GIFMetadataExtractor {
}
$buf = unpack( 'C', $data )[1];
$bpp = ( $buf & 7 ) + 1;
}
$buf = unpack( 'C', $data )[1];
$bpp = ( $buf & 7 ) + 1;
+ // @phan-suppress-next-line PhanTypeInvalidLeftOperandOfIntegerOp
$buf >>= 7;
$have_map = $buf & 1;
$buf >>= 7;
$have_map = $buf & 1;