diff --git a/classes/class.ilOpencastPageComponentPluginGUI.php b/classes/class.ilOpencastPageComponentPluginGUI.php index 5ba14ab..b544910 100644 --- a/classes/class.ilOpencastPageComponentPluginGUI.php +++ b/classes/class.ilOpencastPageComponentPluginGUI.php @@ -525,10 +525,10 @@ protected function setStyleFromProps(ilTemplate $tpl, array $properties) $tpl->setVariable('RATIO', $ratio); $tpl->setVariable('MAX-WIDTH', $properties[self::PROP_WIDTH]); $tpl->setVariable('MAX-HEIGHT', $properties[self::PROP_HEIGHT]); - if ($properties[self::PROP_RESPONSIVE] != false) { + if ((bool)($properties[self::PROP_RESPONSIVE] ?? false) === true) { $tpl->setVariable('WIDTH', 'width:100%;'); } - switch ($properties[self::PROP_POSITION]) { + switch ($properties[self::PROP_POSITION] ?? null) { case self::POSITION_CENTER: $tpl->setVariable('CONTAINER_STYLE', 'text-align:center;'); break;