Download & Extend

Error in SQL Syntax regarding SID

Project:Flag
Version:6.x-2.x-dev
Component:Flag core
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

As follow up to #271582: Allow anonymous users to flag content, regarding Comment #20, I had the same error with the current dev.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT * FROM flag_content WHERE content_type = 'node' AND content_id = 2 AND (uid = 0 OR uid = 0) AND sid =

This error is simply resolved by replacing the last two %s placeholders with the %d (as it is done in the rest of the module). Patch for this will be attached in first comment.

Comments

#1

And here comes the patch.

AttachmentSize
flag_sql_error_sid-1293448-1.patch 1.71 KB

#2

Status:active» needs review

#3

Sub

#4

Status:needs review» reviewed & tested by the community

Nice one! Thanks for the patch @derhasi. I'll test and commit next time I'm working on Flag.

#5

Title:error in SQL Syntax regarding SID» Error in SQL Syntax regarding SID
Status:reviewed & tested by the community» fixed

Committed. Thanks @derhasi!

#6

Status:fixed» closed (fixed)

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