From 2911a7e2305d1ee864fd4c10f6b45afbaab1bc56 Mon Sep 17 00:00:00 2001 From: Holger Woltersdorf Date: Sat, 15 Apr 2017 20:30:16 +0200 Subject: [PATCH] Fixes double assignment --- src/Socket.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Socket.php b/src/Socket.php index 396137f..480b283 100644 --- a/src/Socket.php +++ b/src/Socket.php @@ -324,9 +324,9 @@ public function fetchResponse( ?int $timeoutMs = null ) : ProvidesResponseData private function readPacket() : ?array { - if ( $packet = fread( $this->resource, self::HEADER_LEN ) ) + if ( $header = fread( $this->resource, self::HEADER_LEN ) ) { - $packet = $this->packetEncoder->decodeHeader( $packet ); + $packet = $this->packetEncoder->decodeHeader( $header ); $packet['content'] = ''; if ( $packet['contentLength'] )