Skip to content

An issue with "Image Widget" custom sizes #1688

@ramiy

Description

@ramiy

Description

When you set custom image sizes on "Image Widget", and you enter only the width or the only the height, you get a PHP notice.

PHP Notices

Missing width notice:

[06-May-2017 13:48:48 UTC] PHP Notice: Undefined offset: 0 in C:\xampp\htdocs\elementor\wp-content\plugins\elementor\includes\libraries\bfi-thumb\bfi-thumb.php on line 792

[06-May-2017 13:48:48 UTC] PHP Notice: Undefined offset: 0 in C:\xampp\htdocs\elementor\wp-content\plugins\elementor\includes\libraries\bfi-thumb\bfi-thumb.php on line 797

Missing height notice:

[06-May-2017 13:51:41 UTC] PHP Notice: Undefined offset: 1 in C:\xampp\htdocs\elementor\wp-content\plugins\elementor\includes\libraries\bfi-thumb\bfi-thumb.php on line 793

[06-May-2017 13:51:41 UTC] PHP Notice: Undefined offset: 1 in C:\xampp\htdocs\elementor\wp-content\plugins\elementor\includes\libraries\bfi-thumb\bfi-thumb.php on line 797

Steps to reproduce

  1. turn on your debug log.
  2. Drag a new "Image Widget" to any section.
  3. Select a "Custom" image size.
  4. Set only the image "Width", no "Height".
  5. Save the page and view the page on your front-end.
  6. Now check out the log.

Environment

  • WordPress 4.7.4
  • Elementor 1.4.5

Screenshot

image-widget-error

Metadata

Metadata

Assignees

Labels

bugIndicates a bug with one or multiple components.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions