[Top][All Lists]
[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:16:37 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031024 Debian/1.5-2 |
=================== BUG #6602: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=6602&group_id=509
Changes by: Dave Hall <address@hidden>
Date: Tue 11/18/03 at 01:16 (Australia/Melbourne)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
This has been fixed in CVS and should be available in the next
release.
=================== BUG #6602: FULL BUG SNAPSHOT ===================
Submitted by: bwlang Project: phpGroupWare
Submitted on: Tue 11/18/03 at 01:04
Category: API - phpGWapi Bug Group: 0.9.14.007 release
Severity: 5 - Major Priority: High
Resolution: Fixed Assigned to: None
Status: Closed 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()."'"
.")"
Follow-up Comments
*******************
-------------------------------------------------------
Date: Tue 11/18/03 at 01:16 By: skwashd
This has been fixed in CVS and should be available in the next
release.
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/