From 9a4346e370b464432930bb3ca6fddb812a678df6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 8 Jun 2007 08:54:00 +0000 Subject: [PATCH] bugfix --- htdocs/lib/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index c99a683de37..2533d11ad95 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1308,7 +1308,7 @@ function dol_loginfunction($notused,$pearstatus) if ($socid > 0) $sql .= " AND dbt.fk_soc = ".$socid; } - if ($db->query($sql)) + if ($sql && $db->query($sql)) { if ($db->num_rows() == 0) {