Code Duplication    Length = 5-13 lines in 2 locations

core/db_models/EEM_Base.model.php 1 location

@@ 1921-1933 (lines=13) @@
1918
			}elseif( $result === false ){
1919
				throw new EE_Error( sprintf( __( 'WPDB Error occurred, but no error message was logged by wpdb! The wpdb method called was "%1$s" and the arguments were "%2$s"', 'event_espresso' ), $wpdb_method, var_export( $arguments_to_provide, true ) ) );
1920
			}
1921
		}elseif( $result === false ) {
1922
			EE_Error::add_error( 
1923
				sprintf( 
1924
					__( 'A database error has occurred. Turn on WP_DEBUG for more information.||A database error occurred doing wpdb method "%1$s", with arguments "%2$s". The error was "%3$s"', 'event_espresso' ),
1925
					$wpdb_method,
1926
					var_export( $arguments_to_provide, true ),
1927
					$wpdb->last_error
1928
				), 
1929
				__FILE__, 
1930
				__FUNCTION__, 
1931
				__LINE__
1932
			);
1933
		}
1934
		return $result;
1935
	}
1936

core/helpers/EEH_Sideloader.helper.php 1 location

@@ 152-156 (lines=5) @@
149
		$path = apply_filters( 'FHEE__EEH_Sideloader__sideload__new_path', $this->_upload_to . $this->_new_file_name, $this );
150
151
		//move file in
152
		if ( false === @ rename( $file, $path ) ) {
153
			unlink( $temp_file );
154
			EE_Error::add_error(  sprintf( __('Unable to move the file to new location (possible permissions errors). This is the path the class attempted to move the file to: %s', 'event_espresso' ), $path ), __FILE__, __FUNCTION__, __LINE__ );
155
			return false;
156
		}
157
158
		//set permissions
159
		$permissions = apply_filters( 'FHEE__EEH_Sideloader__sideload__permissions_applied', $this->_permissions, $this );