Skip to content

Commit

Permalink
Handle null type better
Browse files Browse the repository at this point in the history
Closes #559
  • Loading branch information
polyfractal committed Mar 30, 2017
1 parent b951829 commit 5a6d9b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Elasticsearch/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ public function extractArgument(&$params, $arg)
$params = (array) $params;
}

if (isset($params[$arg]) === true) {
if (array_key_exists($arg, $params) === true) {
$val = $params[$arg];
unset($params[$arg]);

Expand Down
2 changes: 1 addition & 1 deletion src/Elasticsearch/Namespaces/AbstractNamespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function extractArgument(&$params, $arg)
$params = (array) $params;
}

if (isset($params[$arg]) === true) {
if (array_key_exists($arg, $params) === true) {
$val = $params[$arg];
unset($params[$arg]);

Expand Down

0 comments on commit 5a6d9b9

Please sign in to comment.