FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » How to prevent division by zero error
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to prevent division by zero error [message #37515 is a reply to message #37503] Thu, 31 May 2007 10:39 Go to previous messageGo to previous message
derek is currently offline  derek   United Kingdom
Messages: 21
Registered: May 2007
Karma:
Junior Member
Thank you very much. I changed this to a number higher than zero (I was trying not to show any icons, but obviously this is not how to achieve that), went back to the forum and was able to post without the divide by zero error.

However, and I can't say whether this is connected or not, now when users try to log in they get this message:

Quote:

Warning: pg_query() [function.pg-query]: Query failed: ERROR: Argument of OR must be type boolean, not type integer in [path]/docs/forum/index.php on line 95

Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in [path]/FUDforum/include/core.inc on line 188


The sql_errors file has this (I'm using postgres):

Quote:

?1429 ?1180600719?([path]/docs/forum/index.php:95<br />
[path]/docs/forum/index.php:89<br />
[path]/docs/forum/theme/default/index.php:151<br />
[path]/docs/forum/index.php:1219<br />
) : ERROR: Argument of OR must be type boolean, not type integer<br />
Query: SELECT
m.subject, m.id, m.post_stamp,
u.id, u.alias,
f.cat_id, f.forum_icon, f.id, f.last_post_id, f.moderators, f.name, f.descr, f.post_count, f.thread_count,
fr.last_view, mo.id, COALESCE(g2.group_cache_opt, g1.group_cache_opt) AS group_cache_opt,
c.cat_opt &amp; 4
FROM fud25_fc_view v
INNER JOIN fud25_cat c ON c.id=v.c
INNER JOIN fud25_forum f ON f.id=v.f
INNER JOIN fud25_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id=f.id
LEFT JOIN fud25_msg m ON f.last_post_id=m.id
LEFT JOIN fud25_users u ON u.id=m.poster_id LEFT JOIN fud25_forum_read fr ON fr.forum_id=f.id AND fr.user_id=9 LEFT JOIN fud25_mod mo ON mo.user_id=9 AND mo.forum_id=f.id LEFT JOIN fud25_group_cache g2 ON g2.user_id=9 AND g2.resource_id=f.id WHERE (mo.id IS NOT NULL OR (COALESCE(g2.group_cache_opt, g1.group_cache_opt)) &amp; 1)&gt;0 ORDER BY v.id<br />
_GET: array (
'S' =&gt; 'd3a34e44ffaf72b0bd2b6a6a77aaabe0',
'SQ' =&gt; '727735018baf0ff543f3998f0c220d62',
)<br />
Server Version: <br />


I see the problem reported here:

http://fudforum.org/forum/index.php?t=msg&goto=33770&&srch=Quer y+failed#msg_33770

but does this mean that the wrong version of index.php is being distrubuted with the upgrade? Can you confirm what/where the final version is, so I can copy it over the one I installed (or do I have to edit it to add in the corrected lines?)

Thanks again,

Derek
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: disbale unknow/unconfirmed user to enter forum
Next Topic: rebuild search index timing out
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 14:34:29 GMT 2024

Total time taken to generate the page: 0.03814 seconds