Customer portal : Security exception raised when adding contact on a new UserRequest / Incident. This was caused by a bug in the SecurityHelper while checking scopes for a class that had no objects yet. (R-011452)

SVN:trunk[4249]
This commit is contained in:
Guillaume Lajarige
2016-06-23 07:23:56 +00:00
parent 31a375f640
commit 29cd969d49

View File

@@ -98,7 +98,9 @@ class SecurityHelper
// - Checking if query result is null
$oSet = new DBObjectSet($oScopeQuery);
if ($oSet->Count() === 0)
// Note : This is to address a bug (#R-011452). We creating an object that is the first of its class, this would failed as the scope query always return an empty set
//if ($oSet->Count() === 0)
if (($oSet->Count() === 0) && ($sObjectId !== null))
{
if ($oApp['debug'])
{