Code Duplication    Length = 4-4 lines in 2 locations

core/libraries/messages/EE_messages.lib.php 2 locations

@@ 433-436 (lines=4) @@
430
				//let's GET the message body from the messenger (instead of the normal send_message)
431
				return $messenger->get_preview( $message->messages[0], $message, $send );
432
433
			} else {
434
				EE_Error::add_error( sprintf( __('Messenger: %s does not exist', 'event_espresso'), $messenger ), __FILE__, __FUNCTION__, __LINE__ );
435
				return FALSE;
436
			}
437
438
		} else {
439
			EE_Error::add_error( sprintf( __('Message type: %s does not exist', 'event_espresso'), $type ), __FILE__, __FUNCTION__, __LINE__ );
@@ 564-567 (lines=4) @@
561
		if ( !$is_global ) {
562
			$has_active = EEM_Message_Template_Group::instance()->count( array( array( 'MTP_is_active' => TRUE, 'MTP_messenger' => $this->_messenger->name, 'MTP_message_type' => $message_type ) ) );
563
564
			if ( $has_active == 0 ) {
565
				EE_Error::add_error( sprintf(__(' The %s message type is not registered with the %s messenger. Please visit the Messenger activation page to assign this message type first if you want to use it.', 'event_espresso'), $message_type, $messenger), __FILE__, __FUNCTION__, __LINE__ );
566
				return false;
567
			}
568
569
		}
570
		return true;