Code Duplication    Length = 5-5 lines in 2 locations

includes/media/GIFMetadataExtractor.php 1 location

@@ 67-71 (lines=5) @@
64
		$xmp = "";
65
		$comment = [];
66
67
		if ( !$filename ) {
68
			throw new Exception( "No file name specified" );
69
		} elseif ( !file_exists( $filename ) || is_dir( $filename ) ) {
70
			throw new Exception( "File $filename does not exist" );
71
		}
72
73
		$fh = fopen( $filename, 'rb' );
74

includes/media/PNGMetadataExtractor.php 1 location

@@ 84-88 (lines=5) @@
81
		$bitDepth = 0;
82
		$colorType = 'unknown';
83
84
		if ( !$filename ) {
85
			throw new Exception( __METHOD__ . ": No file name specified" );
86
		} elseif ( !file_exists( $filename ) || is_dir( $filename ) ) {
87
			throw new Exception( __METHOD__ . ": File $filename does not exist" );
88
		}
89
90
		$fh = fopen( $filename, 'rb' );
91