diff --git a/src/Env.php b/src/Env.php index 27ee6b4..89a2621 100644 --- a/src/Env.php +++ b/src/Env.php @@ -23,7 +23,7 @@ class Env extends Hash public function get(string $key) { - if ($this->has($key)) { + if (array_key_exists($key, $this->data)) { return $this->data[$key]; } elseif ($this->parent) { return $this->parent->get($key); diff --git a/src/Hash.php b/src/Hash.php index ce09a70..1ce8ee8 100644 --- a/src/Hash.php +++ b/src/Hash.php @@ -5,7 +5,7 @@ class Hash extends Collection { public function get(string $key) { - if ($this->has($key)) { + if (array_key_exists($key, $this->data)) { return $this->data[$key]; } diff --git a/src/MList.php b/src/MList.php index fa6d5a1..cf3a4dc 100644 --- a/src/MList.php +++ b/src/MList.php @@ -5,7 +5,7 @@ class MList extends Seq { public function get(int $index) { - if ($this->has($index)) { + if (array_key_exists($index, $this->data)) { return $this->data[$index]; } diff --git a/src/Vector.php b/src/Vector.php index 20d229e..e3b0cd3 100644 --- a/src/Vector.php +++ b/src/Vector.php @@ -5,7 +5,7 @@ class Vector extends Seq { public function get(int $index) { - if ($this->has($index)) { + if (array_key_exists($index, $this->data)) { return $this->data[$index]; }