error_column($mailArray); } throw new \Exception("Unknown Format"); } /** * Renders the error column. * @since 1.8.0 * @param $item * @return string */ function error_column($item) { if ( empty( $item['error'] ) ) { return ''; } if ( strlen( $item['error'] ) <= self::MAX_ERROR_CHAR_LENGTH ) { return $item['error']; } echo substr( $item['error'], 0, self::MAX_ERROR_CHAR_LENGTH ) . '...'; } }