zendframework / zend-view

View component from Zend Framework
BSD 3-Clause "New" or "Revised" License
49 stars 61 forks source link

PHP 7.3 issue with compact() in HeadLink.php #172

Closed unicarevcs closed 5 years ago

unicarevcs commented 5 years ago

Under PHP 7.3 we see the following logged: PHP Notice: compact(): Undefined variable: extras in src\Helper\HeadLink.php on line 413

A quick fix replaces lines 408-413 with: $attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet');

if ($args && is_array($args[0])) { $attributes['extras'] = array_shift($args); }

froschdesign commented 5 years ago

We already have a pull request (#170) for this problem and will be released with the next bugfix release (2.10.1).

Ocramius commented 5 years ago

Closing as duplicate