Skip to content

Commit

Permalink
minor #23217 [Serializer] Fix workaround min php version (ogizanagi)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] Fix workaround min php version

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22444 (comment) <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

74db2e6 [Serializer] Fix workaround min php version
  • Loading branch information
fabpot committed Jun 18, 2017
2 parents db8b29b + 74db2e6 commit b223241
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
$timezone = $this->getTimezone($context);

if (null !== $dateTimeFormat) {
if (null === $timezone && PHP_VERSION_ID < 50600) {
if (null === $timezone && PHP_VERSION_ID < 70000) {
// https://bugs.php.net/bug.php?id=68669
$object = \DateTime::class === $class ? \DateTime::createFromFormat($dateTimeFormat, $data) : \DateTimeImmutable::createFromFormat($dateTimeFormat, $data);
} else {
Expand Down

0 comments on commit b223241

Please sign in to comment.