From 2df14f04192da6773c5ad58e2c868487cfefe547 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 13 Mar 2003 17:59:45 +0000 Subject: [PATCH] fix for bug #2549, patch from ||cw --- phpgwapi/inc/class.db_mysql.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.db_mysql.inc.php b/phpgwapi/inc/class.db_mysql.inc.php index 6388676828..f607e5c31e 100644 --- a/phpgwapi/inc/class.db_mysql.inc.php +++ b/phpgwapi/inc/class.db_mysql.inc.php @@ -542,9 +542,11 @@ $this->Error = @mysql_error($this->Link_ID); // need to be BEFORE unlock, $this->Errno = @mysql_errno($this->Link_ID); // else we get its error or none - $this->unlock(); /* Just in case there is a table currently locked */ - - if($this->Halt_On_Error == 'no') + if ($this->Link_ID) // only if we have a link, else infinite loop + { + $this->unlock(); /* Just in case there is a table currently locked */ + } + if ($this->Halt_On_Error == "no") { return; }