Fix fatal error by validating array key type before using in empty() (#34295)
This commit is contained in:
parent
5771b6bd1f
commit
de4990a0fd
1 changed files with 3 additions and 0 deletions
|
|
@ -1239,6 +1239,9 @@ class ActionComm extends CommonObject
|
|||
if (!is_array($val)) { // For backward compatibility when val=id
|
||||
$val = array('id' => $val);
|
||||
}
|
||||
if (!isset($val['id']) || !is_scalar($val['id'])) {
|
||||
continue;
|
||||
}
|
||||
if (!empty($already_inserted[$val['id']])) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue