diff --git a/src/Http.php b/src/Http.php index 566af24..2d35c60 100644 --- a/src/Http.php +++ b/src/Http.php @@ -134,10 +134,10 @@ public function request( $method, $url, $headers = [], $params = [] ) { $this->curl->setOpt( $ch, CURLOPT_POSTFIELDS, $params ); if ($this->postDataFormat == 'json') { - array_push( $headers, 'Content-Type: application/json' ); + $headers[] = 'Content-Type: application/json'; } elseif ($this->postDataFormat == 'msgpack') { - array_push( $headers, 'Content-Type: application/x-msgpack' ); + $headers[] = 'Content-Type: application/x-msgpack'; } } else { throw new AblyRequestException( 'Unknown $params format', -1, -1 );