FIX check thirdparty defined when PROJECT_THIRDPARTY_REQUIRED is set

This commit is contained in:
Laurent Destailleur 2019-04-10 16:54:20 +02:00
parent cfa414b2de
commit 621709ed42

View File

@ -190,10 +190,10 @@ class Project extends CommonObject
dol_syslog(get_class($this)."::create error -1 ref null", LOG_ERR);
return -1;
}
if (! empty($conf->global->PROJECT_THIRDPARTY_REQUIRED) && ! $this->socid > 0)
if (! empty($conf->global->PROJECT_THIRDPARTY_REQUIRED) && ! ($this->socid > 0))
{
$this->error = 'ErrorFieldsRequired';
dol_syslog(get_class($this)."::create error -1 ref null", LOG_ERR);
dol_syslog(get_class($this)."::create error -1 thirdparty not defined and option PROJECT_THIRDPARTY_REQUIRED is set", LOG_ERR);
return -1;
}