phpgroupware-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-tracker] [bug #6602] invalid sql and incorrect error messa


From: nobody
Subject: [Phpgroupware-tracker] [bug #6602] invalid sql and incorrect error message when ldap server not available with postgres 7.3
Date: Mon, 17 Nov 2003 09:04:09 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030922 Mozilla Firebird/0.6.1

=================== BUG #6602: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6602&group_id=509

Submitted by: bwlang                  Project: phpGroupWare                 
Submitted on: Mon 11/17/2003 at 14:04
Category:  API - phpGWapi             Bug Group:  0.9.14.007 release        
Severity:  5 - Major                  Priority:  High                       
Resolution:  None                     Assigned to:  None                    
Status:  Open                         Component Version:  CVS               
Platform Version:  Linux - Debian     Reproducibility:  Every Time          

Summary:  invalid sql and incorrect error message when ldap server not 
available with postgres 7.3

Original Submission:  the problem is that the error logger attempts to insert 

'' into an integer field for the current userid.

This is invalid sql in recent versions of postgres.



Here's a simple patch to put in an invalid uid instead of ''

With this patch applied the actual problem is displayed instead of an sql error.



diff -u -r1.11 class.errorlog.inc.php

--- class.errorlog.inc.php      12 Jan 2002 22:12:40 -0000      1.11

+++ class.errorlog.inc.php      17 Nov 2003 13:58:34 -0000

@@ -106,9 +106,15 @@

                {

                        $db = $GLOBALS['phpgw']->db;

 //                     $db->lock('phpgw_log');

+                       // make sure that account_id is not ''

+                       if ($GLOBALS['phpgw']->session->account_id == '') {

+                               $account_id = -1;

+                       } else {

+                               $account_id = 
$GLOBALS['phpgw']->session->account_id;

+                       }

                        $db->query("insert into phpgw_log (log_date, log_user, 
log_app, log_severity) values "

                                ."('". 
$GLOBALS['phpgw']->db->to_timestamp(time())

-                               ."','".$GLOBALS['phpgw']->session->account_id

+                               ."','".$account_id

                                
."','".$GLOBALS['phpgw_info']['flags']['currentapp']."'"

                                .",'".$this->severity()."'"

                                .")"





No Followups Have Been Posted


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6602&group_id=509

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]