Settings: JsonFormat::decode() expects string not StreamInterface
JsonFormat::decode() expects the content to decode as a string not a StreamInterface but Response::getBody() will return a StreamInterface. This was caught by phan as a PhanTypeMismatchArgument error. This patch fixes it by calling getContents() which returns the remaining content as a string. Change-Id: I2ca03f06e7b481ccf19e1c39fa0002b4405ef23a
This commit is contained in:
parent
584c2d0967
commit
3eff7189dd
1 changed files with 1 additions and 1 deletions
|
|
@ -240,7 +240,7 @@ class EtcdSource implements CacheableSource {
|
|||
$settings = [];
|
||||
|
||||
try {
|
||||
$resp = $this->format->decode( $response->getBody() );
|
||||
$resp = $this->format->decode( $response->getBody()->getContents() );
|
||||
|
||||
if (
|
||||
!isset( $resp['node'] ) || !is_array( $resp['node'] )
|
||||
|
|
|
|||
Loading…
Reference in a new issue