Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | notice_raised_when_max_resolution_is_not_set-2893983-3.patch | 771 bytes | Znak |
Comments
Comment #2
Znak CreditAttribution: Znak commentedComment #3
Znak CreditAttribution: Znak commentedComment #4
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedCommitted. Thanks!
Comment #7
Znak CreditAttribution: Znak at Drupal Ukraine Community for Drupal Ukraine Community commented