Skip to content

Conversation

@nicolas-grekas
Copy link
Member

Q A
Branch? 4.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Same as #31869, reverts #31861


try {
$content = json_decode($content, true, 512, JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? JSON_THROW_ON_ERROR : 0));
$content = json_decode($content, true, 512, JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the added \ should allow the compiler to inline the check :)

@fabpot
Copy link
Member

fabpot commented Jun 5, 2019

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 846116e into symfony:4.3 Jun 5, 2019
fabpot added a commit that referenced this pull request Jun 5, 2019
…nicolas-grekas)

This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] revert bad logic around JSON_THROW_ON_ERROR

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Same as #31869, reverts #31861

Commits
-------

846116e [HttpClient] revert bad logic around JSON_THROW_ON_ERROR
@nicolas-grekas nicolas-grekas deleted the fix-json-enc43 branch June 5, 2019 14:41
@fabpot fabpot mentioned this pull request Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants