fixed fatal error if no connection (db does not exist)

This commit is contained in:
Ralf Becker 2003-11-02 15:19:14 +00:00
parent 30d3bedaa4
commit f1cf865b12

View File

@ -574,12 +574,12 @@
* @param string $file file of calling method/function (optional) * @param string $file file of calling method/function (optional)
*/ */
function halt($msg, $line = '', $file = '') function halt($msg, $line = '', $file = '')
{
if ($this->Link_ID) // only if we have a link, else infinite loop
{ {
$this->Error = $this->Link_ID->ErrorMsg(); // need to be BEFORE unlock, $this->Error = $this->Link_ID->ErrorMsg(); // need to be BEFORE unlock,
$this->Errno = $this->Link_ID->ErrorNo(); // else we get its error or none $this->Errno = $this->Link_ID->ErrorNo(); // else we get its error or none
if ($this->Link_ID) // only if we have a link, else infinite loop
{
$this->unlock(); /* Just in case there is a table currently locked */ $this->unlock(); /* Just in case there is a table currently locked */
} }
if ($this->Halt_On_Error == "no") if ($this->Halt_On_Error == "no")