Menu

#70 insufficient error reporting

open
nobody
5
2006-10-16
2006-10-16
Anonymous
No

Hi,

I just installed IssueTracker and had some trouble
getting it going. The issue turned out to be
that my database user had insufficient rights to
the IssueTracker database. My bad, but it should
say something in the error logs.

There's a bit of code in includes/classes/dbi.class.php
, function init(). It logs errors in connecting, but
if it connects but can't select the database, the
function returns TRUE and doesn't log anything.

I suggest something like this:

if ($this->link) {
if (!mysql_select_db($this->name,$this->link)) {
$this->logger("Not okay switching to database
$this->name : ".mysql_error($this->link));
return false;
}
return TRUE;
}

Thanks.
Craig Schiavone
cschiavo@webcom.com

Discussion


Log in to post a comment.