|
From: Benjamin C. <bc...@us...> - 2002-05-08 12:57:22
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv30935
Modified Files:
bug.php
Log Message:
Added some error handling for the database object
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- bug.php 7 May 2002 15:34:03 -0000 1.103
+++ bug.php 8 May 2002 12:57:18 -0000 1.104
@@ -509,7 +509,11 @@
// Create a new db connection because of the limit query affecting later queries
$db = DB::Connect($dsn);
+ if (DB::isError($db)) {
+ die($db->message.'<br>'.$db->userinfo);
+ }
$db->setOption('optimize', 'portability');
+ $db->setErrorHandling(PEAR_ERROR_CALLBACK, "handle_db_error");
if (!isset($_sv['queryinfo']['query']) || !$_sv['queryinfo']['query']) {
return array('', '');
|