Skip to content

Commit d84e9c8

Browse files
committed
Fix segfault in period caster
1 parent 660fecc commit d84e9c8

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)