Spotted while running unit tests.
Change-Id: Idf863bed71b5f11b41b81d37fb190e6e7a4d0268
$method
);
foreach ( $res as $row ) {
- wfDebug( "Job with hash '{$row->job_sha1}' is a duplicate." );
+ wfDebug( "Job with hash '{$row->job_sha1}' is a duplicate.\n" );
unset( $rowSet[$row->job_sha1] ); // already enqueued
}
}
return $vals[0];
}
elseif ( count( $vals ) === 0 ) {
- wfDebug( __METHOD__ . ' metadata array with 0 elements!' );
+ wfDebug( __METHOD__ . " metadata array with 0 elements!\n" );
return ""; // paranoia. This should never happen
}
/* @todo FIXME: This should hide some of the list entries if there are
wfRestoreWarnings();
if ( !$data || !is_array( $data ) ) {
- wfDebug( __METHOD__ . ' invalid GIF metadata' );
+ wfDebug( __METHOD__ . " invalid GIF metadata\n" );
return self::METADATA_BAD;
}
if ( !isset( $data['metadata']['_MW_GIF_VERSION'] )
|| $data['metadata']['_MW_GIF_VERSION'] != GIFMetadataExtractor::VERSION ) {
- wfDebug( __METHOD__ . ' old but compatible GIF metadata' );
+ wfDebug( __METHOD__ . " old but compatible GIF metadata\n" );
return self::METADATA_COMPATIBLE;
}
return self::METADATA_GOOD;
$data = fread( $fh, $blockLength );
if ( $blockLength != 11 ) {
- wfDebug( __METHOD__ . ' GIF application block with wrong length' );
+ wfDebug( __METHOD__ . " GIF application block with wrong length\n" );
fseek( $fh, -( $blockLength + 1 ), SEEK_CUR );
self::skipBlock( $fh );
continue;
if ( $com === $oldCom ) {
$segments["COM"][] = $oldCom;
} else {
- wfDebug( __METHOD__ . ' Ignoring JPEG comment as is garbage.' );
+ wfDebug( __METHOD__ . " Ignoring JPEG comment as is garbage.\n" );
}
} elseif ( $buffer === "\xE1" ) {
} elseif ( $byteOrderMarker === 'II' ) {
$segments['byteOrder'] = 'LE';
} else {
- wfDebug( __METHOD__ . ' Invalid byte ordering?!' );
+ wfDebug( __METHOD__ . " Invalid byte ordering?!\n" );
}
}
} elseif ( $buffer === "\xED" ) {
wfRestoreWarnings();
if ( !$data || !is_array( $data ) ) {
- wfDebug( __METHOD__ . ' invalid png metadata' );
+ wfDebug( __METHOD__ . " invalid png metadata\n" );
return self::METADATA_BAD;
}
if ( !isset( $data['metadata']['_MW_PNG_VERSION'] )
|| $data['metadata']['_MW_PNG_VERSION'] != PNGMetadataExtractor::VERSION ) {
- wfDebug( __METHOD__ . ' old but compatible png metadata' );
+ wfDebug( __METHOD__ . " old but compatible png metadata\n" );
return self::METADATA_COMPATIBLE;
}
return self::METADATA_GOOD;
if ( $items[5] === false ) {
// decompression failed
- wfDebug( __METHOD__ . ' Error decompressing iTxt chunk - ' . $items[1] );
+ wfDebug( __METHOD__ . ' Error decompressing iTxt chunk - ' . $items[1] . "\n");
fseek( $fh, self::$CRC_size, SEEK_CUR );
continue;
}
} else {
wfDebug( __METHOD__ . ' Skipping compressed png iTXt chunk due to lack of zlib,'
- . ' or potentially invalid compression method' );
+ . " or potentially invalid compression method\n" );
fseek( $fh, self::$CRC_size, SEEK_CUR );
continue;
}
$compression = substr( $postKeyword, 0, 1 );
$content = substr( $postKeyword, 1 );
if ( $compression !== "\x00" ) {
- wfDebug( __METHOD__ . " Unrecognized compression method in zTXt ($keyword). Skipping." );
+ wfDebug( __METHOD__ . " Unrecognized compression method in zTXt ($keyword). Skipping.\n" );
fseek( $fh, self::$CRC_size, SEEK_CUR );
continue;
}
if ( $content === false ) {
// decompression failed
- wfDebug( __METHOD__ . ' Error decompressing zTXt chunk - ' . $keyword );
+ wfDebug( __METHOD__ . ' Error decompressing zTXt chunk - ' . $keyword . "\n");
fseek( $fh, self::$CRC_size, SEEK_CUR );
continue;
}
$text[$finalKeyword]['_type'] = 'lang';
} else {
- wfDebug( __METHOD__ . " Cannot decompress zTXt chunk due to lack of zlib. Skipping." );
+ wfDebug( __METHOD__ . " Cannot decompress zTXt chunk due to lack of zlib. Skipping.\n" );
fseek( $fh, $chunk_size, SEEK_CUR );
}
} elseif ( $chunk_type == 'tIME' ) {