Skip to content

Commit

Permalink
Ensure the array keys actually exist!
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Stephens committed Mar 13, 2017
1 parent 0087fc3 commit 062ead3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Omniphx/Forrest/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,12 @@ private function setOptions($arguments) {
$options = [];
if (empty($arguments)) return $options;

$this->setArgument($arguments[0], $options);
$this->setArgument($arguments[1], $options);
if(!empty($arguments[0])) {
$this->setArgument($arguments[0], $options);
}
if(!empty($arguments[1])) {
$this->setArgument($arguments[1], $options);
}

return $options;
}
Expand Down

0 comments on commit 062ead3

Please sign in to comment.