Skip to content

Commit be3ff09

Browse files
swissspidyCopilot
andauthored
Update lib/cli/table/Ascii.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 95d08e8 commit be3ff09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cli/table/Ascii.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function row( array $row ) {
204204

205205
private function padColumn($content, $column) {
206206
$column_name = isset( $this->_headers[$column] ) ? $this->_headers[$column] : '';
207-
$alignment = array_key_exists($column_name, $this->_alignments) ? $this->_alignments[$column_name] : Column::ALIGN_LEFT;
207+
$alignment = ($column_name !== '' && array_key_exists($column_name, $this->_alignments)) ? $this->_alignments[$column_name] : Column::ALIGN_LEFT;
208208
$content = str_replace( "\t", ' ', (string) $content );
209209
return $this->_characters['padding'] . Colors::pad( $content, $this->_widths[ $column ], $this->isPreColorized( $column ), false, $alignment) . $this->_characters['padding'];
210210
}

0 commit comments

Comments
 (0)