Getting this error on Drupal 8.6

Notice: Undefined variable: data in Drupal\instagram_without_api\Plugin\Block\InstagramWithoutApi->build() (line 140 of modules/instagram_without_api/src/Plugin/Block/InstagramWithoutApi.php).

Comments

isalmanhaider created an issue. See original summary.

malcomio’s picture

Priority: Critical » Minor

I don't think that PHP notices are critical issues - production environments should be configured not to display errors and notices

See https://www.ostraining.com/blog/drupal/warnings/

pranav.aeer’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB

Here is the patch to fix the error.

ngkoutsaik’s picture

Status: Needs review » Reviewed & tested by the community

Hi,
I tested the patch and it works.

I had to run the patch with git apply -v --reject --whitespace=fix Fixed-undefined-variable-issue-3064187-3_0.patch for it to be accepted.

ipwa’s picture

Version: 8.x-1.0 » 3.0.x-dev
Assigned: Unassigned » ipwa
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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