Skip to content

Commit 2d27f0d

Browse files
Prevent warnings in PHP 8.2 when $col_values is empty (#160)
1 parent 22270f4 commit 2d27f0d

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
@@ -180,7 +180,7 @@ public function row( array $row ) {
180180
$row_values = array();
181181
$has_more = false;
182182
foreach( $extra_rows as $col => &$col_values ) {
183-
$row_values[ $col ] = array_shift( $col_values );
183+
$row_values[ $col ] = ! empty( $col_values ) ? array_shift( $col_values ) : '';
184184
if ( count( $col_values ) ) {
185185
$has_more = true;
186186
}

0 commit comments

Comments
 (0)