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

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