mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Fix: avoid warning if no object
This commit is contained in:
@@ -4003,7 +4003,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
|
|||||||
if (verifCond($values[4]))
|
if (verifCond($values[4]))
|
||||||
{
|
{
|
||||||
if ($values[3]) $langs->load($values[3]);
|
if ($values[3]) $langs->load($values[3]);
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[5]),1);
|
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', (! empty($object->id)?$object->id:''), $values[5]), 1);
|
||||||
$head[$h][1] = $langs->trans($values[2]);
|
$head[$h][1] = $langs->trans($values[2]);
|
||||||
$head[$h][2] = str_replace('+','',$values[1]);
|
$head[$h][2] = str_replace('+','',$values[1]);
|
||||||
$h++;
|
$h++;
|
||||||
@@ -4013,7 +4013,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
|
|||||||
{
|
{
|
||||||
if ($values[0] != $type) continue;
|
if ($values[0] != $type) continue;
|
||||||
if ($values[3]) $langs->load($values[3]);
|
if ($values[3]) $langs->load($values[3]);
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[4]),1);
|
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', (! empty($object->id)?$object->id:''), $values[4]), 1);
|
||||||
$head[$h][1] = $langs->trans($values[2]);
|
$head[$h][1] = $langs->trans($values[2]);
|
||||||
$head[$h][2] = str_replace('+','',$values[1]);
|
$head[$h][2] = str_replace('+','',$values[1]);
|
||||||
$h++;
|
$h++;
|
||||||
@@ -4022,7 +4022,7 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
|
|||||||
{
|
{
|
||||||
if ($values[0] != $type) continue;
|
if ($values[0] != $type) continue;
|
||||||
if ($values[2]) $langs->load($values[2]);
|
if ($values[2]) $langs->load($values[2]);
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', (! empty($object->id)?$object->id:''), $values[3]), 1);
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
$head[$h][1] = $langs->trans($values[1]);
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
$head[$h][2] = 'tab'.$values[1];
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
Reference in New Issue
Block a user