Skip to content

Commit 5aab516

Browse files
committed
Merge branch '4.2' into 4.3
* 4.2: [FrameworkBundle] Fix calling Client::getProfile() before sending a request Fix type error [Security/Core] Don't use ParagonIE_Sodium_Compat collect called listeners information only once add test to avoid regressions fix typos Turkish translation added to Form Component
2 parents d31e6e0 + 043be51 commit 5aab516

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function getKernel()
6666
*/
6767
public function getProfile()
6868
{
69-
if (!$this->kernel->getContainer()->has('profiler')) {
69+
if (null === $this->response || !$this->kernel->getContainer()->has('profiler')) {
7070
return false;
7171
}
7272

Tests/Functional/ProfilerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public function testProfilerIsDisabled($insulate)
2828

2929
// enable the profiler for the next request
3030
$client->enableProfiler();
31-
$crawler = $client->request('GET', '/profiler');
32-
$profile = $client->getProfile();
33-
$this->assertInternalType('object', $profile);
31+
$this->assertFalse($client->getProfile());
32+
$client->request('GET', '/profiler');
33+
$this->assertInternalType('object', $client->getProfile());
3434

3535
$client->request('GET', '/profiler');
3636
$this->assertFalse($client->getProfile());

0 commit comments

Comments
 (0)