Skip to content

Commit

Permalink
array_key_exists instead of isset
Browse files Browse the repository at this point in the history
@jacobsteringa pointed out that isset would return false if there's a falsey value in the entries
  • Loading branch information
anned20 authored Oct 2, 2017
1 parent 148144d commit 1cb5882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function get($id)
*/
public function has($id)
{
if (isset($this->entries[$id])) {
if (array_key_exists($id, $this->entries)) {
return true;
}

Expand Down

0 comments on commit 1cb5882

Please sign in to comment.