diff --git a/src/Curl/CaseInsensitiveArray.php b/src/Curl/CaseInsensitiveArray.php index c42dc86..07714cb 100644 --- a/src/Curl/CaseInsensitiveArray.php +++ b/src/Curl/CaseInsensitiveArray.php @@ -136,7 +136,8 @@ class CaseInsensitiveArray implements \ArrayAccess, \Countable, \Iterator { */ public function offsetGet($offset) { $offsetlower = strtolower($offset); - return array_key_exists($offsetlower, $this->data) ? $this->data[$offsetlower] : NULL; + // As isset() is false on 'NULL' anyway, use it, and return NULL, faster + return isset($this->data[$offsetlower]) ? $this->data[$offsetlower] : NULL; } /**