I am getting these error messages:

Notice: Trying to get property of non-object in template_preprocess_insert_image() (line 50 of .../modules/insert/includes/insert.inc).
Notice: Undefined index: filename in insert_element_process() (line 222 of .../modules/insert/insert.module).
Notice: Trying to get property of non-object in template_preprocess_image_insert_image() (line 56 of .../modules/insert/includes/image.inc).
Notice: Trying to get property of non-object in template_preprocess_image_insert_image() (line 58 of .../modules/insert/includes/image.inc).

The attached patch seems to fix the problem.

Steps to reproduce the problem:
1. Upload an image.
2. Using the file browser, select the image you just uploaded.
3. Remove one of the two copies of the image on the list.

Comments

quicksketch’s picture

Title: Undefined index: filename in insert_element_process() » Undefined index: filename in insert_element_process() when removing a file that is used twice
Priority: Normal » Minor
Status: Needs review » Fixed
StatusFileSize
new1.11 KB

Thanks again Liam. I modified the patch so we don't have two return statements in there. Committed to 7.x-1.x branch.

Status: Fixed » Closed (fixed)

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