Skip to content

Commit e466720

Browse files
committed
ACP2E-3501: VAPT: Business Logic Error - future date as customer date of birth
1 parent a8ef117 commit e466720

File tree

1 file changed

+3
-3
lines changed
  • app/code/Magento/Customer/Model/Validator

1 file changed

+3
-3
lines changed

app/code/Magento/Customer/Model/Validator/Dob.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ public function isValid($customer): bool
5353
* Check if specified dob is not in the future
5454
*
5555
* @param string|null $dobValue
56-
* @param DateTimeZone|null $timezone
56+
* @param DateTimeZone $timezone
5757
* @return bool
5858
*/
59-
private function isValidDob(?string $dobValue, ?DateTimeZone $timezone = null): bool
59+
private function isValidDob(?string $dobValue, DateTimeZone $timezone): bool
6060
{
61-
if ($dobValue != null) {
61+
if ($dobValue) {
6262

6363
// Get the date of birth and set the time to 00:00:00
6464
$dobDate = new \DateTime($dobValue, $timezone);

0 commit comments

Comments
 (0)