Skip to content

Commit 08e54b5

Browse files
authored
[revert-datetimetype-changes] Clarify operator precedence in error (CubiclDev#37)
checking.
1 parent 8299ee8 commit 08e54b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Type/DatetimeType.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ private function isValidDatetime(string $value): bool
3838
$date = DateTime::createFromFormat($this->datetimeFormat, $value, new DateTimeZone($this->datetimeZone));
3939
$errors = DateTime::getLastErrors();
4040

41-
return $date && (!$errors || $errors['warning_count'] === 0 && $errors['error_count'] === 0);
41+
return $date && (
42+
!$errors || ($errors['warning_count'] === 0 && $errors['error_count'] === 0)
43+
);
4244
}
4345
}

0 commit comments

Comments
 (0)