#1960 Error in "MyTiki Home" when using PostgreSQL (8.0.2)

v1.9RC
open-fixed
nobody
5
2005-06-03
2005-05-05
Tiziano Müller
No

When I try to view "MyTiki Home" I get the following error:

Warning: postgres7 error: ERROR: argument of OR must be
type boolean, not type integer in query:

select count(distinct "t_head"."taskId") FROM
"tiki_user_tasks_history" AS "t_history",
"tiki_user_tasks" AS "t_head" , "users_usergroups"
WHERE "t_head"."taskId" = "t_history"."belongs_to" AND
"t_head"."last_version" = "t_history"."task_version"
AND ( ( 0 ) OR ("t_head"."user" = ? AND
"t_head"."creator" = ? ) OR ("t_head"."user" = ? AND
"t_head"."creator" != ? ) OR ("t_head"."user" != ? AND
"t_head"."creator" != ? AND "users_usergroups"."userId"
= ? AND "users_usergroups"."groupName" =
"t_head"."public_for_group") ) AND (
"t_history"."deleted" IS NULL) AND (
"t_history"."completed" IS NULL) ORDER BY
"t_history"."priority" asc, "t_head"."taskId" desc

in /var/www/lusankya/htdocs/tikiwiki/lib/tikidblib.php
on line 134

******

An error occured in a database query!

Context:
File /tikiwiki/tiki-my_tiki.php
Url /tikiwiki/tiki-my_tiki.php
Query:
select count(distinct "t_head"."taskId") FROM
"tiki_user_tasks_history" AS "t_history",
"tiki_user_tasks" AS "t_head" , "users_usergroups"
WHERE "t_head"."taskId" = "t_history"."belongs_to" AND
"t_head"."last_version" = "t_history"."task_version"
AND ( ( 0 ) OR ("t_head"."user" = ? AND
"t_head"."creator" = ? ) OR ("t_head"."user" = ? AND
"t_head"."creator" != ? ) OR ("t_head"."user" != ? AND
"t_head"."creator" != ? AND "users_usergroups"."userId"
= ? AND "users_usergroups"."groupName" =
"t_head"."public_for_group") ) AND (
"t_history"."deleted" IS NULL) AND (
"t_history"."completed" IS NULL) ORDER BY
"t_history"."priority" asc, "t_head"."taskId" desc
Values:

=======================

Either I have a strange setup of apache, postgresql and
php or nobody ever tested v1.9 with postgresql...

Discussion

  • Logged In: YES
    user_id=935305

    I think, that the question-marks are the problems...

     
  • Logged In: YES
    user_id=935305

    ... wrong.

    The problem is the following line in lib/tasks/tasklib.php:
    305: $query .= "( 0 ) "; //Dummy

    It should be:
    305: $query .= "( '0' ) "; //Dummy
    or
    305: $query .= "( FALSE ) "; //Dummy

     
  • Logged In: YES
    user_id=750082

    fixed on CVS

     
    • status: open --> open-fixed