Code Duplication    Length = 9-10 lines in 2 locations

core/helpers/EEH_Activation.helper.php 1 location

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

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

@@ 586-594 (lines=9) @@
583
			$transaction_processor = EE_Registry::instance()->load_class( 'Transaction_Processor' );
584
			// set the start time for this reg step
585
			if ( ! $transaction_processor->set_reg_step_initiated( $this->transaction, $reg_step->slug() ) ) {
586
				if ( WP_DEBUG ) {
587
					EE_Error::add_error(
588
						sprintf(
589
							__( 'The "%1$s" registration step was not initialized properly.', 'event_espresso' ),
590
							$reg_step->name()
591
						),
592
						__FILE__, __FUNCTION__, __LINE__
593
					);
594
				}
595
			};
596
		}
597
	}