Linux webm002.cluster126.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
/
home
/
ariannadhf
/
www
/
wp-content
/
plugins
/
wp-mail-logging
/
src
/
Renderer
/
Column
/
/home/ariannadhf/www/wp-content/plugins/wp-mail-logging/src/Renderer/Column/ErrorColumn.php
<?php namespace No3x\WPML\Renderer\Column; class ErrorColumn extends GenericColumn { /** * Max number of character to display before we * truncate with ellipsis. * * @var int */ const MAX_ERROR_CHAR_LENGTH = 90; /** * TimestampColumn constructor. */ public function __construct() { parent::__construct("error"); } /** * @inheritdoc */ public function render(array $mailArray, $format) { if($format == ColumnFormat::SIMPLE) { return parent::render($mailArray, $format); } elseif ($format == ColumnFormat::FULL) { return $this->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 ) . '...'; } }