Code Duplication    Length = 4-6 lines in 2 locations

core/EE_Error.core.php 1 location

@@ 1109-1112 (lines=4) @@
1106
		try {
1107
			EEH_File::ensure_file_exists_and_is_writable( EVENT_ESPRESSO_UPLOAD_DIR . 'logs' . DS . self::$_exception_log_file );
1108
			EEH_File::add_htaccess_deny_from_all( EVENT_ESPRESSO_UPLOAD_DIR . 'logs' ); 
1109
			if ( ! $clear ) {
1110
				//get existing log file and append new log info
1111
				$exception_log = EEH_File::get_file_contents( EVENT_ESPRESSO_UPLOAD_DIR . 'logs' . DS . self::$_exception_log_file ) . $exception_log;
1112
			}
1113
			EEH_File::write_to_file( EVENT_ESPRESSO_UPLOAD_DIR . 'logs' . DS . self::$_exception_log_file, $exception_log );
1114
		} catch( EE_Error $e ){
1115
			EE_Error::add_error( sprintf( __(  'Event Espresso error logging could not be setup because: %s', 'event_espresso' ), $e->getMessage() ));

core/exceptions/BaseException.php 1 location

@@ 378-383 (lines=6) @@
375
				EVENT_ESPRESSO_UPLOAD_DIR . 'logs' . DS . BaseException::$_exception_log_file
376
			);
377
			\EEH_File::add_htaccess_deny_from_all( EVENT_ESPRESSO_UPLOAD_DIR . 'logs' );
378
			if ( ! $clear ) {
379
				//get existing log file and append new log info
380
				$exception_log = \EEH_File::get_file_contents(
381
						EVENT_ESPRESSO_UPLOAD_DIR . 'logs' . DS . BaseException::$_exception_log_file
382
					) . $exception_log;
383
			}
384
			\EEH_File::write_to_file(
385
				EVENT_ESPRESSO_UPLOAD_DIR . 'logs' . DS . BaseException::$_exception_log_file,
386
				$exception_log