Skip to content

Commit

Permalink
Fixed put method
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lver committed Apr 26, 2023
1 parent 701cf9a commit 47e9c05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog yii2 etcd component

## 1.0.5
- Fixed `put` method

## 1.0.4
- Removed `grpc/grpc` package from pre-implementation dependencies

Expand Down
2 changes: 1 addition & 1 deletion src/Etcd.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function put(string $key, string $value): bool
{
$options = [
RequestOptions::BODY => json_encode(
['key' => $key, 'value' => base64_encode($value)],
['key' => base64_encode(trim($key)), 'value' => base64_encode(trim($value))],
JSON_THROW_ON_ERROR
),
];
Expand Down

0 comments on commit 47e9c05

Please sign in to comment.