mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 10:21:32 +01:00
Fix protection to avoid errors
This commit is contained in:
@@ -5395,7 +5395,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
|
||||
$substitutionarray['__[AnyConstantKey]__']=$outputlangs->trans('ValueOfConstant');
|
||||
$substitutionarray['__DOL_MAIN_URL_ROOT__']=DOL_MAIN_URL_ROOT;
|
||||
}
|
||||
if (empty($exclude) || ! in_array('mycompany', $exclude))
|
||||
if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc))
|
||||
{
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
'__MYCOMPANY_NAME__' => $mysoc->name,
|
||||
|
||||
Reference in New Issue
Block a user