Off-by-one error(?) in List Membership insight

number_format(end($list_membership_count_history_by_day['history'])) will returns 0 because there is no 'history'.