Issue Task Closed

#56025Replace array_key_exists() with (isset($array[$key]) || array_key_exists())

Michiel Roos 02/16/14, 20:36 updated 03/03/19, 13:27

Description

Calling array_key_exists can be avoided most of the time by using isset().

isset() may however return FALSE for cases where there is in fact an existing key, but where the value is NULL. So we need to OR the isset() with the old array_key_exists to have a fallback in place for the cases where the array value is a NULL.

Reviews 1