Avoid errors when objectid is -1
This commit is contained in:
parent
500d737980
commit
c4bd8e6df2
@ -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
|
// If we have a particular object to check permissions on, we check this object
|
||||||
// is linked to a company allowed to $user.
|
// is linked to a company allowed to $user.
|
||||||
if (!empty($objectid))
|
if (!empty($objectid) && $objectid > 0)
|
||||||
{
|
{
|
||||||
foreach ($features as $feature)
|
foreach ($features as $feature)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user