Avoid errors when objectid is -1

This commit is contained in:
Laurent Destailleur 2009-11-29 16:53:46 +00:00
parent 500d737980
commit c4bd8e6df2

View File

@ -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)
{