Code Duplication    Length = 9-10 lines in 2 locations

modules/single_page_checkout/inc/EE_Checkout.class.php 1 location

@@ 601-609 (lines=9) @@
598
		) {
599
			// set the start time for this reg step
600
			if ( ! $this->transaction->set_reg_step_initiated( $reg_step->slug() ) ) {
601
				if ( WP_DEBUG ) {
602
					EE_Error::add_error(
603
						sprintf(
604
							__( 'The "%1$s" registration step was not initialized properly.', 'event_espresso' ),
605
							$reg_step->name()
606
						),
607
						__FILE__, __FUNCTION__, __LINE__
608
					);
609
				}
610
			}
611
		}
612
	}

core/helpers/EEH_Activation.helper.php 1 location

@@ 808-817 (lines=10) @@
805
			$current_data_migration_script->set_migrating( false );
806
			$current_data_migration_script->schema_changes_before_migration();
807
			$current_data_migration_script->schema_changes_after_migration();
808
			if( $current_data_migration_script->get_errors() ){
809
				if( WP_DEBUG ){
810
					foreach( $current_data_migration_script->get_errors() as $error ){
811
						EE_Error::add_error($error, __FILE__, __FUNCTION__, __LINE__ );
812
					}
813
				}else{
814
					EE_Error::add_error( __( 'There were errors creating the Event Espresso database tables and Event Espresso has been deactivated. To view the errors, please enable WP_DEBUG in your wp-config.php file.', 'event_espresso' ) );
815
				}
816
				return false;
817
			}
818
			EE_Data_Migration_Manager::instance()->update_current_database_state_to();
819
		}else{
820
			EE_Error::add_error( __( 'Could not determine most up-to-date data migration script from which to pull database schema structure. So database is probably not setup properly', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__);