The error is:
Recoverable fatal error: Argument 1 passed to image_resize() must be an instance of stdClass, boolean given, called in /var/www/drupal7/profiles/uw_base_profile/modules/contrib/image_resize_filter/image_resize_filter.module on line 499 and defined in image_resize() (line 279 of /var/www/drupal7/includes/image.inc).

Steps to recreate:

  1. Create an image that is not what it says it is (for instance, rename a BMP file with the JPG extension)
  2. Start creating a node where you can upload and insert an image.
  3. Upload and insert the image at its original size, and drag to resize. (The image displays in the editor, because browsers are lenient about this sort of thing.)
  4. Save the node and watch Drupal crash.

I have patch in progress.

CommentFileSizeAuthor
#1 invalidimage-1933342-1.patch1.08 KBkpaxman

Comments

kpaxman’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

My patch checks to make sure that an image was successfully created; if not, it reverts back to the original file (using the code from "move remote images into place if they are already the right size"). There may be a nicer, cleaner way to handle this, but this at least clears the error.

joelstein’s picture

I can confirm this exact bug, but I didn't try the patch. I just re-uploaded an image with the proper extension.

Still, it seems some graceful error handling is in order.

zil.arman’s picture

kpaxman,
I've faced the same problem. Your patch helped me.
Thanks a lot!

ar-jan’s picture

Version: 7.x-1.13 » 7.x-1.x-dev
Issue summary: View changes

I can confirm this works. Patch applied to 1.14 (succeeded with offset of 17 lines).

It's actually quite important to handle this somehow; in our case this problem also prevented administrative pages such as content overview from working, not just the node view of the node containing the problematic image.

vinmassaro’s picture

Status: Needs review » Reviewed & tested by the community

A user renamed a .bmp file to .jpg and had it embedded in the WYSIWYG area. This caused the fatal error in #1 for us which this patch fixed. Please commit, thanks!

ram4nd’s picture

Status: Reviewed & tested by the community » Fixed

  • ram4nd committed ec0d770 on 7.x-1.x authored by kpaxman
    Issue #1933342 by kpaxman: Images with wrong extension cause "...

Status: Fixed » Closed (fixed)

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

PierreLittle’s picture

I need some help with this issue on my site. Willing to contract it out. pmlitttle@gmail.com