Skip to content

Commit cba3393

Browse files
minor symfony#24023 [VarDumper] Fix segfault in period caster (maidmaid)
This PR was merged into the 3.4 branch. Discussion ---------- [VarDumper] Fix segfault in period caster | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#23668 (comment) | License | MIT | Doc PR | / [This segfault](https://bugs.php.net/bug.php?id=71635) was fixed in [5.6.20](http://www.php.net/ChangeLog-5.php#5.6.20) and in [7.0.5](http://www.php.net/ChangeLog-7.php#7.0.5). Issue in action here: https://3v4l.org/DhOdT#v565 Commits ------- d84e9c8 Fix segfault in period caster
2 parents 3d5172a + d84e9c8 commit cba3393

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/VarDumper/Caster/DateCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stu
8585

8686
public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, $isNested, $filter)
8787
{
88-
if (defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50605) {
88+
if (defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50620 || (\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70005)) { // see https://bugs.php.net/bug.php?id=71635
8989
return $a;
9090
}
9191

src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public function testDumpPeriod($start, $interval, $end, $options, $expected)
334334
*/
335335
public function testCastPeriod($start, $interval, $end, $options, $xPeriod, $xDates)
336336
{
337-
if (defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50605) {
337+
if (defined('HHVM_VERSION_ID') || \PHP_VERSION_ID < 50620 || (\PHP_VERSION_ID >= 70000 && \PHP_VERSION_ID < 70005)) {
338338
$this->markTestSkipped();
339339
}
340340

0 commit comments

Comments
 (0)