Closed (fixed)
Project:
Drupal core
Version:
5.7
Component:
filter.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2006 at 00:02 UTC
Updated:
12 Aug 2008 at 13:41 UTC
When accessing content, the following errors are being reported when not logged in:
Invalid argument supplied for foreach() in ...\modules\filter.module on line 560.
which also results in the following error from 564:
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 'OR format = 3' at line 1 query: SELECT * FROM filter_formats WHERE OR format = 3
(it's being reported from include\database.mysql.inc but it's obvious where it's originating from)
the Anonymous user does have access to Access Content in access admin (as well as a few other permissions)
Comments
Comment #1
sangamreddi commentedI got the same error, form my investigations if only one filter is enabled i am seeing this error, if more than one filter eneabled then this error disappear.
Comment #2
Zen commentedUnable to reproduce. Please provide more information and if possible, accurate steps to reproduce this on a clean install.
Thanks
-K
Comment #3
gerhard killesreiter commentedclosing, no feedback
Comment #4
SolomonGifford commentedI'm having this in 5.7 now.
Invalid argument supplied for foreach() in [....]modules/filter/filter.module on line 644.
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 'OR format = 1' at line 1 query: SELECT * FROM filter_formats WHERE OR format = 1 in [....]includes/database.mysql.inc on line 172.
Comment #5
bart jansens commentedThis is caused by $user->roles being empty, which should never happen. Probably the database is corrupt, or some other module is messing with the $user object.
- check the users table in the database. Is there a row with uid 0 in there?
- which other modules are you using?
Comment #6
SolomonGifford commentedThanks for the hint. I do have another auth module that we've written, so I bet thats where the problem is.
Thanks!