[Tickets #789] NEW: List of messages
bugs at bugs.horde.org
bugs at bugs.horde.org
Tue Nov 9 01:10:12 PST 2004
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=789
-----------------------------------------------------------------------
Ticket | 789
Created By | nkahn at cmd.lu
Summary | List of messages
Queue | Swoosh
State | Unconfirmed
Priority | 1. Low
Type | Bug
Owners |
-----------------------------------------------------------------------
nkahn at cmd.lu (2004-11-09 01:10) wrote:
When there is no message in the database, a list of fake values are
displayed in the list of messages on the website.
After investigation it appears that a test was missing in function _getSends
of the file "lib/Storage/sql.php". Indeed you're making a SQL request using
'$message_ids' but this variable can be empty and in that case the SQL
syntax will be wrong. Here is the error I had in logs:
Nov 09 09:54:41 HORDE [error] [swoosh] DB Error: syntax error: SELECT
message_id, swoosh_sends.* FROM swoosh_sends WHERE message_id IN ()
[nativecode=1064 ** 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] [on line 266 of
"/home/cvs/horde/swoosh/lib/Storage/sql.php"]
I have corrected this error by adding a test on the variable '$message_ids'
before making the SQL query:
if (empty($message_ids)) {
return array();
}
Hope it helps.
Nicolas Kahn
More information about the bugs
mailing list