Code Duplication    Length = 4-5 lines in 2 locations

thumb.php 2 locations

@@ 321-324 (lines=4) @@
318
319
		if ( $status->isOK() ) {
320
			RequestContext::getMain()->getStats()->timing( 'media.thumbnail.stream', $streamtime );
321
		} else {
322
			wfThumbError( 500, 'Could not stream the file', null, [ 'file' => $thumbName,
323
				'path' => $thumbPath, 'error' => $status->getWikiText( false, false, 'en' ) ] );
324
		}
325
		return;
326
	}
327
@@ 367-371 (lines=5) @@
364
	} else {
365
		// Stream the file if there were no errors
366
		$status = $thumb->streamFileWithStatus( $headers );
367
		if ( !$status->isOK() ) {
368
			wfThumbError( 500, 'Could not stream the file', null, [
369
				'file' => $thumbName, 'path' => $thumbPath,
370
				'error' => $status->getWikiText( false, false, 'en' ) ] );
371
		}
372
	}
373
}
374