mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX avoid "Undefined array key" warning
This commit is contained in:
parent
188070729a
commit
e5a6f5f9ce
|
|
@ -58,13 +58,13 @@ if ($action == 'update' && !empty($arrayofparameters) && is_array($arrayofparame
|
|||
foreach ($arrayofparameters as $key => $val) {
|
||||
// Modify constant only if key was posted (avoid resetting key to the null value)
|
||||
if (GETPOSTISSET($key)) {
|
||||
if (!empty($val['type']) && preg_match('/category:/', $val['type'])) {
|
||||
if (isset($val['type']) && preg_match('/category:/', $val['type'])) {
|
||||
if (GETPOSTINT($key) == '-1') {
|
||||
$val_const = '';
|
||||
} else {
|
||||
$val_const = GETPOSTINT($key);
|
||||
}
|
||||
} elseif ($val['type'] == 'html') {
|
||||
} elseif (isset($val['type']) && $val['type'] == 'html') {
|
||||
$val_const = GETPOST($key, 'restricthtml');
|
||||
} else {
|
||||
$val_const = GETPOST($key, 'alpha');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user