From c4bd8e6df2c376619a1259de4c2c91259fe05726 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Nov 2009 16:53:46 +0000 Subject: [PATCH] Avoid errors when objectid is -1 --- htdocs/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index ca47e29f4f4..9c237dcea88 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -1634,7 +1634,7 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='' // If we have a particular object to check permissions on, we check this object // is linked to a company allowed to $user. - if (!empty($objectid)) + if (!empty($objectid) && $objectid > 0) { foreach ($features as $feature) {