Hello

I am getting the error Notice: Undefined index: width em image_resize_filter_get_images() (linha 378 de /home/content/00/6298300/html/bsEngenharia/sites/all/modules/image_resize_filter/image_resize_filter.module).

The error occurs when I try to set an image's width as a percent in the Image properties Panel(see the attachment).
The image displays correctly but not without producing the error.
Should I forget about using percents or is there a way to use percents without the error.

I added the link to the attachment Link to attachment because it looks like it did not upload.

Comments

svajlenka’s picture

Status: Active » Needs review
StatusFileSize
new1.33 KB

Patch incoming... working on this now.. disregard the attached patch

svajlenka’s picture

Here we go, proper patch to resolve this,

grendzy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

raspberryman’s picture

Tested and verified.

Mat77’s picture

I confirm the patch worked for me too!

Thanks

bryancasler’s picture

Worked for me as well.

bryancasler’s picture

Issue summary: View changes

add a link

ben coleman’s picture

Works here as well. I take it quicksketch isn't keeping up on commits?

joelpittet’s picture

Issue summary: View changes

bump

joelpittet’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/image_resize_filter.module
@@ -374,8 +374,11 @@ function image_resize_filter_get_images($settings, $text) {
+    if (!isset($attributes['width'])) {
...
+    if (!isset($attributes['height'])) {

I could be wrong, but do you think these should be empty checks? Because if either of them are 0 there will be a divide by 0 error.

eojthebrave’s picture

Version: 7.x-1.13 » 7.x-1.16
Status: Needs work » Needs review
StatusFileSize
new699 bytes

Here's an updated patch for 7.x-1.6 and using empty instead of isset.

joelpittet’s picture

Version: 7.x-1.16 » 7.x-1.x-dev

Moving to the dev branch because that is where things can be fixed.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

And thanks for considering my suggestion:)

  • ram4nd committed c9c47d4 on 8.x-1.x authored by eojthebrave
    Issue #1704080 by svajlenka, eojthebrave, jimclegg: Notice: Undefined...
ram4nd’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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