Skip to content

Commit b16ad9a

Browse files
Merge branch '3.4' into 4.2
* 3.4: Fix expired lock not cleaned [HttpFoundation] Fix SA/phpdoc JsonResponse SimpleCacheAdapter fails to cache any item if a namespace is used validate composite constraints in all groups [Serializer] Handle true and false appropriately in CSV encoder Fix binary operation `+`, `-` or `*` on string [VarDumper] fix dumping objects that implement __debugInfo() [Routing] fix absolute url generation when scheme is not known
2 parents 9279727 + acf5616 commit b16ad9a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DateFormatter/DateFormat/DayOfYearTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class DayOfYearTransformer extends Transformer
2525
*/
2626
public function format(\DateTime $dateTime, int $length): string
2727
{
28-
$dayOfYear = $dateTime->format('z') + 1;
28+
$dayOfYear = (int) $dateTime->format('z') + 1;
2929

3030
return $this->padLeft($dayOfYear, $length);
3131
}

DateFormatter/DateFormat/FullTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ protected function calculateUnixTimestamp(\DateTime $dateTime, array $options)
315315
preg_match_all($this->regExp, $this->pattern, $matches);
316316
if (\in_array('yy', $matches[0])) {
317317
$dateTime->setTimestamp(time());
318-
$year = $year > $dateTime->format('y') + 20 ? 1900 + $year : 2000 + $year;
318+
$year = $year > (int) $dateTime->format('y') + 20 ? 1900 + $year : 2000 + $year;
319319
}
320320

321321
$dateTime->setDate($year, $month, $day);

0 commit comments

Comments
 (0)