Code Duplication    Length = 4-4 lines in 2 locations

lib/modules/mod_wkhtmltoimage.php 1 location

@@ 61-64 (lines=4) @@
58
			$execResult = 0;
59
60
			exec( $execString, $execOutput, $execResult );
61
			if ( $execResult != 0 && $execResult != 2 ) { // code 2 is for 404's encountered
62
				@unlink( $tempFile );
63
				return ar_error::raiseError( "wkhtmltoimage: error ($execResult) while trying to generate image: " . implode( "\n", (array) $execOutput ), 203 );
64
			}
65
66
			readfile( $tempFile );
67
			unlink( $tempFile );

lib/modules/mod_wkhtmltopdf.php 1 location

@@ 66-69 (lines=4) @@
63
			$execResult = 0;
64
65
			exec( $execString, $execOutput, $execResult );
66
			if ( $execResult != 0 && $execResult != 2 ) { // code 2 is for 404's encountered
67
				@unlink( $tempFile );
68
				return ar_error::raiseError( "wkhtmltopdf: error ($execResult) while trying to generate PDF: " . implode( "\n", (array) $execOutput ), 203 );
69
			}
70
71
			readfile( $tempFile );
72
			unlink( $tempFile );