Skip to content
Snippets Groups Projects

Issue #3382423: oEmbed field formatter creates wrong hash when leaving empty dimensions

Open Issue #3382423: oEmbed field formatter creates wrong hash when leaving empty dimensions
1 unresolved thread
Open Rolando Payán Mosqueda requested to merge issue/drupal-3382423:3382423-11.x into 11.x
1 unresolved thread
Files
2
@@ -161,8 +161,8 @@ public static function defaultSettings() {
@@ -161,8 +161,8 @@ public static function defaultSettings() {
*/
*/
public function viewElements(FieldItemListInterface $items, $langcode) {
public function viewElements(FieldItemListInterface $items, $langcode) {
$element = [];
$element = [];
$max_width = $this->getSetting('max_width');
$max_width = intval($this->getSetting('max_width') ?? 0);
$max_height = $this->getSetting('max_height');
$max_height = intval($this->getSetting('max_height') ?? 0);
foreach ($items as $delta => $item) {
foreach ($items as $delta => $item) {
$main_property = $item->getFieldDefinition()->getFieldStorageDefinition()->getMainPropertyName();
$main_property = $item->getFieldDefinition()->getFieldStorageDefinition()->getMainPropertyName();
Loading