Skip to content

Commit 03b261e

Browse files
author
okarpenko
committed
MAGETWO-35583: Magento\Payment\Test\Unit\Block\Info\CcTest::testGetCcExpDate failed
1 parent a6e17ed commit 03b261e

File tree

1 file changed

+5
-1
lines changed
  • app/code/Magento/Payment/Block/Info

1 file changed

+5
-1
lines changed

app/code/Magento/Payment/Block/Info/Cc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ public function getCcExpMonth()
7878
public function getCcExpDate()
7979
{
8080
$date = new \DateTime('now', new \DateTimeZone($this->_localeDate->getConfigTimezone()));
81-
$date->setDate($this->getInfo()->getCcExpYear(), $this->getInfo()->getCcExpMonth(), $date->format('d'));
81+
$date->setDate(
82+
$this->getInfo()->getCcExpYear(),
83+
$this->getInfo()->getCcExpMonth(),
84+
$date->modify('first day of')->format('d')
85+
);
8286
return $date;
8387
}
8488

0 commit comments

Comments
 (0)