Skip to content

Commit 3b710bd

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

File tree

1 file changed

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

1 file changed

+1
-5
lines changed

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

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

0 commit comments

Comments
 (0)