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

@@ 1062-1079 (lines=18) @@
1059
            $att_success = ! $att_success ? $att_success : $_success;
1060
        }
1061
        // any errors?
1062
        if ($success && false === $att_success) {
1063
            EE_Error::add_error(
1064
                esc_html__(
1065
                    'Event Details saved successfully but something went wrong with saving attachments.',
1066
                    'event_espresso'
1067
                ),
1068
                __FILE__,
1069
                __FUNCTION__,
1070
                __LINE__
1071
            );
1072
        } elseif ($success === false) {
1073
            EE_Error::add_error(
1074
                esc_html__('Event Details did not save successfully.', 'event_espresso'),
1075
                __FILE__,
1076
                __FUNCTION__,
1077
                __LINE__
1078
            );
1079
        }
1080
    }
1081
1082