Merge pull request #17916 from frederic34/patch-16

fix warnings
This commit is contained in:
Laurent Destailleur 2021-06-13 16:21:44 +02:00 committed by GitHub
commit 0cbcba7bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -724,7 +724,6 @@ if ($resql) {
$perm = $user->rights->service->creer; $perm = $user->rights->service->creer;
} elseif ($type == Product::TYPE_PRODUCT) { } elseif ($type == Product::TYPE_PRODUCT) {
$perm = $user->rights->produit->creer; $perm = $user->rights->produit->creer;
} }
$oldtype = $type; $oldtype = $type;
$params = array(); $params = array();

View File

@ -98,7 +98,7 @@ $resources = GETPOST('resources', 'array:int');
// List of fields to search into when doing a "search in all" // List of fields to search into when doing a "search in all"
$fieldstosearchall = array(); $fieldstosearchall = array();
foreach ($object->fields as $key => $val) { foreach ($object->fields as $key => $val) {
if ($val['searchall']) { if (!empty($val['searchall'])) {
$fieldstosearchall['t.'.$key] = $val['label']; $fieldstosearchall['t.'.$key] = $val['label'];
} }
} }
@ -114,7 +114,7 @@ foreach ($object->fields as $key => $val) {
'checked'=>(($visible < 0) ? 0 : 1), 'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)), 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'], 'position'=>$val['position'],
'help'=>$val['help'] 'help' => empty($val['help']) ? '' : $val['help']
); );
} }
} }
@ -124,7 +124,7 @@ $arrayfields['wug.fk_usergroup'] = array(
'checked'=>(($visible < 0) ? 0 : 1), 'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)), 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>1000, 'position'=>1000,
'help'=>$val['help'] 'help' => empty($val['help']) ? '' : $val['help']
); );
$arrayfields['wr.fk_resource'] = array( $arrayfields['wr.fk_resource'] = array(
@ -132,7 +132,7 @@ $arrayfields['wr.fk_resource'] = array(
'checked'=>(($visible < 0) ? 0 : 1), 'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)), 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>1001, 'position'=>1001,
'help'=>$val['help'] 'help' => empty($val['help']) ? '' : $val['help']
); );
// Extra fields // Extra fields