Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit f7242f7

Browse files
committed
Merge branch 'hotfix/170-extras-for-compact-op'
Close #170
2 parents 1ea119c + f648a2a commit f7242f7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ All notable changes to this project will be documented in this file, in reverse
2222

2323
### Fixed
2424

25+
- [#170](https://github.com/zendframework/zend-view/pull/170) ensures that variables referenced in `compact()` operations are properly
26+
initialized, fixing an error that occures in PHP 7.3.
27+
2528
- [#169](https://github.com/zendframework/zend-view/pull/169) adds zendframework/zend-json as a required dependency, as it is referenced
2629
in multiple locations within the package.
2730

src/Helper/HeadLink.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,8 @@ public function createDataStylesheet(array $args)
408408
if ($args && is_array($args[0])) {
409409
$extras = array_shift($args);
410410
$extras = (array) $extras;
411+
} else {
412+
$extras = array();
411413
}
412414

413415
$attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet', 'extras');
@@ -460,6 +462,8 @@ public function createDataAlternate(array $args)
460462
if (isset($extras['media']) && is_array($extras['media'])) {
461463
$extras['media'] = implode(',', $extras['media']);
462464
}
465+
} else {
466+
$extras = array();
463467
}
464468

465469
$href = (string) $href;

0 commit comments

Comments
 (0)