Skip to content

Commit

Permalink
Check for array key
Browse files Browse the repository at this point in the history
  • Loading branch information
mitelg committed May 14, 2018
1 parent fbe3692 commit 0f7562c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ public function offsetExists($offset)
*/
public function offsetGet($offset)
{
return $this->configArray[$offset];
if (array_key_exists($offset, $this->configArray)) {
return $this->configArray[$offset];
}

return null;
}

/**
Expand Down

0 comments on commit 0f7562c

Please sign in to comment.