From c14e6b75b8b565a300a5ef9f7ff36121c71c8b20 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Fri, 13 May 2022 03:16:54 +0800 Subject: [PATCH] fix setBorderWidth bug --- src/ZM/Logger/TablePrinter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ZM/Logger/TablePrinter.php b/src/ZM/Logger/TablePrinter.php index 20f930a..04cb00b 100644 --- a/src/ZM/Logger/TablePrinter.php +++ b/src/ZM/Logger/TablePrinter.php @@ -41,7 +41,7 @@ class TablePrinter */ protected $row_overflow_hide = false; - public function __construct(array $params, string $head = '', string $foot = '', int $max_border_length = 79) + public function __construct(array $params, string $head = '=', string $foot = '=', int $max_border_length = 79) { $this->params = $params; $this->head = $head; @@ -206,8 +206,8 @@ class TablePrinter $terminal_size = $this->fetchTerminalSize(); $this->border_width = $border_width < $terminal_size ? $border_width : $terminal_size; } - $this->head = str_pad($this->head, $this->border_width, '='); - $this->foot = str_pad($this->foot, $this->border_width, '='); + $this->head = str_pad('', $this->border_width, $this->head[0]); + $this->foot = str_pad('', $this->border_width, $this->foot[0]); return $this; }