Closed (fixed)
Project:
Follow
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Jun 2010 at 02:56 UTC
Updated:
12 Jul 2010 at 19:00 UTC
Hi guys,
Not like it matters much at this point, but looking at the result of the update, the options were saved without any square brackets.
The following statement is totally wrong:
$ret[] = update_sql("UPDATE {follow_links} SET path = '$path', options = '$options' WHERE lid = {$link->lid}");
You should use %s/%d as usual!? update_sql() works the same a the db_query.
$ret[] = update_sql("UPDATE {follow_links} SET path = '%s', options = '%s' WHERE lid = %d", $path, $options, $link->lid);
Thank you.
Alexis
| Comment | File | Size | Author |
|---|---|---|---|
| follow-update6001-6.x.patch | 598 bytes | AlexisWilke |
Comments
Comment #1
AlexisWilke commentedActually, I posted a patch, changing settings accordingly.
Comment #2
q0rban commentedHey Alexis! Actually, it's a misconception that update_sql can take the same arguments as db_query. Please see http://api.drupal.org/api/function/update_sql/6. Still sounds like this is a bug though.
Comment #3
AlexisWilke commentedYour right. Your code needs work. [see 1st comment of update_sql] 8-)
To late for me, I updated all my sites.
Good luck.
Alexis
Comment #4
q0rban commentedThanks, committed: http://drupal.org/cvs?commit=385362