Code Duplication    Length = 9-10 lines in 2 locations

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

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

core/helpers/EEH_Activation.helper.php 1 location

@@ 805-814 (lines=10) @@
802
			$current_data_migration_script->set_migrating( false );
803
			$current_data_migration_script->schema_changes_before_migration();
804
			$current_data_migration_script->schema_changes_after_migration();
805
			if( $current_data_migration_script->get_errors() ){
806
				if( WP_DEBUG ){
807
					foreach( $current_data_migration_script->get_errors() as $error ){
808
						EE_Error::add_error($error, __FILE__, __FUNCTION__, __LINE__ );
809
					}
810
				}else{
811
					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' ) );
812
				}
813
				return false;
814
			}
815
			EE_Data_Migration_Manager::instance()->update_current_database_state_to();
816
		}else{
817
			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__);