Skip to content

Commit 631e5ff

Browse files
author
Jeremiah VALERIE
committed
Removed not exists "json_last_error_msg" php 5.4 function
1 parent eba369a commit 631e5ff

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Request/Parser.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ private function getParsedBody(Request $request)
5555
$json = json_decode($body, true);
5656

5757
if (JSON_ERROR_NONE !== json_last_error()) {
58-
throw new BadRequestHttpException(
59-
sprintf('POST body sent invalid JSON [%s]', json_last_error_msg())
60-
);
58+
throw new BadRequestHttpException('POST body sent invalid JSON');
6159
}
6260
$parsedBody = $json;
6361
break;

Tests/Functional/Controller/GraphControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testEndpointWithEmptyQuery()
7474

7575
/**
7676
* @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
77-
* @expectedExceptionMessage POST body sent invalid JSON [Syntax error]
77+
* @expectedExceptionMessage POST body sent invalid JSON
7878
*/
7979
public function testEndpointWithInvalidBodyQuery()
8080
{

0 commit comments

Comments
 (0)