Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Commit f581d7f

Browse files
ikdekkerOcramius
authored andcommitted
Fix memory leak in Client.php
Headers are no longer added every time. They used to be added regardless, which caused the headers array to grow infinitely. [test] Add headers check for content-type & accept [cs] Remove whitespace on empty line
1 parent 10630d4 commit f581d7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/ClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ public function testContentTypeAutomaticallySet()
615615

616616
$this->setServerResponseTo(true);
617617
$this->assertTrue($this->xmlrpcClient->call('method'));
618-
$this->assertSame($expectedContentType, $this->httpClient->getHeader(''));
618+
$this->assertSame($expectedContentType, $this->httpClient->getHeader('Content-Type'));
619619
}
620620

621621
public function testAcceptAutomaticallySet()
@@ -630,7 +630,7 @@ public function testAcceptAutomaticallySet()
630630

631631
$this->setServerResponseTo(true);
632632
$this->assertTrue($this->xmlrpcClient->call('method'));
633-
$this->assertSame($expectedAccept, $this->httpClient->getHeader(''));
633+
$this->assertSame($expectedAccept, $this->httpClient->getHeader('Accept'));
634634
}
635635

636636
/**

0 commit comments

Comments
 (0)