Fix complex component empty detection

This commit is contained in:
Skylar Ittner 2018-05-07 02:14:56 -06:00
parent 132184c56d
commit 2c34acd0fd

View File

@ -154,7 +154,7 @@ function get_complex_component($name, $context = null, $include = []) {
if (count($include) == 0) {
return $content;
}
$filtered = [];
foreach ($include as $i) {
if (array_key_exists($i, $content)) {
@ -170,7 +170,7 @@ function is_complex_empty($name, $context = null) {
if (isset($_GET['edit'])) {
return false;
}
$comp = get_complex_component($name, $context, false);
$comp = get_complex_component($name, $context);
foreach ($comp as $c => $v) {
if (isset($v) && !empty($v)) {
return false;