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 Apr 4, 2017
1 parent 006b3c2 commit 9900cfd
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 9900cfd

Please sign in to comment.