At line 115 you have
db_query('INSERT into {files} (fid, nid, filename, filepath, filemime, filesize)
VALUES (%d, %d, "%s","%s","%s",%d)',
$file['fid'], $node->nid, $file['filename'], $file['filepath'], $file['filemime'], $file['filesize']);
which unfortunately creates an error in postgresql because it expects single quotes around strings (as does mysql but it is a little more tollerant in this case, see http://mysql.com/doc/refman/5.0/en/string-syntax.html ).
I suggest changing the line to
db_query("INSERT into {files} (fid, nid, filename, filepath, filemime, filesize)
VALUES (%d, %d, '%s','%s','%s',%d)",
$file['fid'], $node->nid, $file['filename'], $file['filepath'], $file['filemime'], $file['filesize']);
as that code will work in both.
Thanks,
Steven
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | imagefield.module_2.patch | 1.01 KB | havran |
Comments
Comment #1
havran commentedThis bug is in booth (4.7 and cvs) versions too... Patch for 4.7 is attached (maybe work for cvs too).
Comment #2
drewish commentedsee also: http://drupal.org/node/83864
Comment #3
dopry commentedapplies to HEAD and DRUPAL-4-7, tnx.
Comment #4
dopry commentedumm yeah s/applies/applied && status=fixed.
Comment #5
(not verified) commented