Code Duplication    Length = 18-18 lines in 2 locations

admin_pages/venues/Venues_Admin_Page.core.php 1 location

@@ 875-892 (lines=18) @@
872
        }
873
874
        // any errors?
875
        if ($success && ! $att_success) {
876
            EE_Error::add_error(
877
                __(
878
                    'Venue Details saved successfully but something went wrong with saving attachments.',
879
                    'event_espresso'
880
                ),
881
                __FILE__,
882
                __FUNCTION__,
883
                __LINE__
884
            );
885
        } elseif ($success === false) {
886
            EE_Error::add_error(
887
                __('Venue Details did not save successfully.', 'event_espresso'),
888
                __FILE__,
889
                __FUNCTION__,
890
                __LINE__
891
            );
892
        }
893
    }
894
895

admin_pages/events/Events_Admin_Page.core.php 1 location

@@ 1048-1065 (lines=18) @@
1045
            $att_success = ! $att_success ? $att_success : $_success;
1046
        }
1047
        // any errors?
1048
        if ($success && false === $att_success) {
1049
            EE_Error::add_error(
1050
                esc_html__(
1051
                    'Event Details saved successfully but something went wrong with saving attachments.',
1052
                    'event_espresso'
1053
                ),
1054
                __FILE__,
1055
                __FUNCTION__,
1056
                __LINE__
1057
            );
1058
        } elseif ($success === false) {
1059
            EE_Error::add_error(
1060
                esc_html__('Event Details did not save successfully.', 'event_espresso'),
1061
                __FILE__,
1062
                __FUNCTION__,
1063
                __LINE__
1064
            );
1065
        }
1066
    }
1067
1068