Skip to content

Commit

Permalink
Merge pull request #173 from jrfnl/feature/php-8.4-fix-implicitly-nul…
Browse files Browse the repository at this point in the history
…lable-params

PHP 8.4 | Fix implicitly nullable parameters
  • Loading branch information
swissspidy authored Sep 17, 2024
2 parents 615bdb6 + 5edc06b commit 46ddc1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cli/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class Table {
* @param array $rows The rows of data for this table. Optional.
* @param array $footers Footers used in this table. Optional.
*/
public function __construct(array $headers = null, array $rows = null, array $footers = null) {
public function __construct(array $headers = array(), array $rows = array(), array $footers = array()) {
if (!empty($headers)) {
// If all the rows is given in $headers we use the keys from the
// first row for the header values
if ($rows === null) {
if ($rows === array()) {
$rows = $headers;
$keys = array_keys(array_shift($headers));
$headers = array();
Expand Down

0 comments on commit 46ddc1d

Please sign in to comment.