Without my Patch an error message appears saying MySQL syntax error.
line 115 (v 1.5 2005/08/29 21:53:50 killes)

-       if (!$file->remove && $file->list && ereg('^(image/)', $file->filemime) && !db_result(db_query('SELECT * FROM {upload_images} WHERE fid = %d'))) {
+       if (!$file->remove && $file->list && ereg('^(image/)', $file->filemime) && $file->fid &&
+         !db_result(db_query('SELECT * FROM {upload_images} WHERE fid = %d', $file->fid))) {

%d is not filled in, that is the couse of the MySQL error, and so the code cannot depend when to insert into the database and what to insert.

Comments

killes@www.drop.org’s picture

Status: Needs review » Fixed

Thanks, fixed. Please attach the patch the next time.

Anonymous’s picture

Status: Fixed » Closed (fixed)