Project

General

Profile

Actions

Task #56025

closed

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

Added by Michiel Roos almost 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2014-02-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
medium
Sprint Focus:

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.

Actions

Also available in: Atom PDF