Skip to content

Commit

Permalink
webui: set default extras as empty array to prevent compact() errors
Browse files Browse the repository at this point in the history
PHP compact() function will create php error when $args is an
empty array.

See: zendframework/zend-view#170

Fixes #1205: HeadLink.php error with PHP 7.3
  • Loading branch information
frb121 committed May 31, 2021
1 parent a8da7d0 commit 0fb913c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webui/vendor/zendframework/zend-view/src/Helper/HeadLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ public function createDataStylesheet(array $args)
}
}

$extras = [];

if (0 < count($args) && is_array($args[0])) {
$extras = array_shift($args);
$extras = (array) $extras;
Expand Down Expand Up @@ -443,6 +445,8 @@ public function createDataAlternate(array $args)
$type = array_shift($args);
$title = array_shift($args);

$extras = [];

if (0 < count($args) && is_array($args[0])) {
$extras = array_shift($args);
$extras = (array) $extras;
Expand Down

0 comments on commit 0fb913c

Please sign in to comment.