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

Commit 8950786

Browse files
kilipweierophinney
authored andcommitted
set default extras as empty array to prevent compact() errors
1 parent 1ea119c commit 8950786

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)