forked from Wavyzz/dolibarr
fix phpstan (#32010)
* fix phpstan * Update extrafields_view.tpl.php * Update extrafields.class.php
This commit is contained in:
@@ -51,7 +51,7 @@ class ExtraFields
|
|||||||
public $attributes = array();
|
public $attributes = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array<string,bool|int<0,1>> Array with boolean of status of groups
|
* @var array<string,bool|int<0,1>>|null Array with boolean of status of groups
|
||||||
*/
|
*/
|
||||||
public $expand_display;
|
public $expand_display;
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
* @var CommonObject $object
|
* @var CommonObject $object
|
||||||
* @var Conf $conf
|
* @var Conf $conf
|
||||||
* @var DoliDB $db
|
* @var DoliDB $db
|
||||||
|
* @var ExtraFields $extrafields
|
||||||
* @var Form $form
|
* @var Form $form
|
||||||
* @var Translate $langs
|
* @var Translate $langs
|
||||||
* @var User $user
|
* @var User $user
|
||||||
@@ -81,7 +82,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att
|
|||||||
|
|
||||||
$enabled = 1;
|
$enabled = 1;
|
||||||
if ($enabled && isset($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra])) {
|
if ($enabled && isset($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra])) {
|
||||||
$enabled = (int) dol_eval($extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra], 1, 1, '2');
|
$enabled = (int) dol_eval((string) $extrafields->attributes[$object->table_element]['enabled'][$tmpkeyextra], 1, 1, '2');
|
||||||
}
|
}
|
||||||
if ($enabled && isset($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra])) {
|
if ($enabled && isset($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra])) {
|
||||||
$enabled = (int) dol_eval($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra], 1, 1, '2');
|
$enabled = (int) dol_eval($extrafields->attributes[$object->table_element]['list'][$tmpkeyextra], 1, 1, '2');
|
||||||
|
|||||||
Reference in New Issue
Block a user