Skip to content

Commit

Permalink
Prevent warnings in PHP 8.2 when $col_values is empty (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber authored Jul 21, 2023
1 parent 22270f4 commit 2d27f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cli/table/Ascii.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function row( array $row ) {
$row_values = array();
$has_more = false;
foreach( $extra_rows as $col => &$col_values ) {
$row_values[ $col ] = array_shift( $col_values );
$row_values[ $col ] = ! empty( $col_values ) ? array_shift( $col_values ) : '';
if ( count( $col_values ) ) {
$has_more = true;
}
Expand Down

0 comments on commit 2d27f0d

Please sign in to comment.