Closed (fixed)
Project:
Upload Image
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2005 at 14:03 UTC
Updated:
23 Nov 2005 at 14:20 UTC
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
Comment #1
killes@www.drop.org commentedThanks, fixed. Please attach the patch the next time.
Comment #2
(not verified) commented