Fix php 8 warning on not set field keys

This commit is contained in:
Francis Appels 2021-07-05 14:51:34 +02:00
parent df5878b3d6
commit 1333ca3660
15 changed files with 15 additions and 15 deletions

View File

@ -108,7 +108,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -131,7 +131,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -47,7 +47,7 @@ foreach ($object->fields as $key => $val) {
print '<tr class="field_'.$key.'">';
print '<td';
print ' class="titlefieldcreate';
if ($val['notnull'] > 0) {
if (isset($val['notnull']) && $val['notnull'] > 0) {
print ' fieldrequired';
}
if ($val['type'] == 'text' || $val['type'] == 'html') {

View File

@ -48,7 +48,7 @@ foreach ($object->fields as $key => $val) {
print '<tr class="field_'.$key.'"><td';
print ' class="titlefieldcreate';
if ($val['notnull'] > 0) {
if (isset($val['notnull']) && $val['notnull'] > 0) {
print ' fieldrequired';
}
if (preg_match('/^(text|html)/', $val['type'])) {

View File

@ -119,7 +119,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -128,7 +128,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -115,7 +115,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -165,7 +165,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -115,7 +115,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -126,7 +126,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -108,7 +108,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -123,7 +123,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : 'help'
);
}
}

View File

@ -167,7 +167,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -140,7 +140,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}

View File

@ -135,7 +135,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}