Skip to content

Commit

Permalink
set value to empty string if value is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenFang authored and ChenFang committed Aug 29, 2018
1 parent 69d5dca commit 077fed5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ public function get_key($key)

if (isset($result['kvs'])) {
$result_array = $result['kvs'][0];
if (!isset($result_array["value"])) {
$result_array["value"] = ""; // set value to empty string is value is NULL
}
} else {
$result_array = array(
"value" => "",
Expand Down

0 comments on commit 077fed5

Please sign in to comment.