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

CommentFileSizeAuthor
follow-update6001-6.x.patch598 bytesAlexisWilke

Comments

AlexisWilke’s picture

Assigned: Unassigned » AlexisWilke
Status: Active » Needs review

Actually, I posted a patch, changing settings accordingly.

q0rban’s picture

Status: Needs review » Needs work

Hey 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.

AlexisWilke’s picture

Your right. Your code needs work. [see 1st comment of update_sql] 8-)

To late for me, I updated all my sites.

Good luck.
Alexis

q0rban’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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