Problem/Motivation

Warning: Trying to access array offset on value of type bool in Drupal\media_entity_instagram\Plugin\media\Source\Instagram->getMetadata()

CommentFileSizeAuthor
#4 3200960-4.patch516 byteschr.fritsch
#2 3200960.patch506 byteschr.fritsch

Comments

chr.fritsch created an issue. See original summary.

chr.fritsch’s picture

Status: Active » Needs review
StatusFileSize
new506 bytes

This a PHP 8 issue.

daniel.bosen’s picture

Status: Needs review » Needs work

I would suggest to either simplify to if (!empty($matches['shortcode'])), or go all-in on type testing and do if (is_array($matches) && !empty($matches['shortcode']))

chr.fritsch’s picture

Status: Needs work » Needs review
StatusFileSize
new516 bytes

Strict type check

daniel.bosen’s picture

Status: Needs review » Reviewed & tested by the community

lgtm

  • chr.fritsch committed c98e2b7 on 3.x
    Issue #3200960 by chr.fritsch, daniel.bosen: Trying to access array...
chr.fritsch’s picture

Status: Reviewed & tested by the community » Fixed

Committed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

liam morland’s picture

Issue tags: -PHP 8 +PHP 8.0