If the user hasn't set the max resolution for an image a notice is raised on any page displaying a form for the entity browser.

The error message:

Notice: Undefined index: max_resolution in Drupal\entity_browser\Plugin\Field\FieldWidget\FileBrowserWidget->getFileValidators() (line 471 of

The line in question reads...

if ($settings['max_resolution'] || $settings['min_resolution']) {

Please change this to

    if (isset($settings['max_resolution']) || isset($settings['min_resolution']))

And that will silence the notice.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Aki Tendo created an issue. See original summary.

Znak’s picture

Assigned: Unassigned » Znak
Znak’s picture

Assigned: Znak » Unassigned
Status: Active » Needs review
FileSize
771 bytes
slashrsm’s picture

Status: Needs review » Fixed

Committed. Thanks!

  • slashrsm committed 68b834d on 8.x-1.x authored by Znak
    Issue #2893983 by Znak: Fix notice when min/max resolutions are not set...

Status: Fixed » Closed (fixed)

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

Znak’s picture