8000 Modified datetime check to not pass for empty date. · ReservedDeveloper/csv-bundle@3b6b6f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b6b6f1

Browse files
author
Daniel Lakes
committed
Modified datetime check to not pass for empty date.
1 parent dcac780 commit 3b6b6f1
< 8000 /div>

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

FileReader/Validator/AbstractCsvFileValidator.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,10 @@ abstract protected function validateDataField($fieldKey, $fieldValue);
135135
* @param string $dateFieldValue
136136
* @param string $dateFormat
137137
*
138-
* @return bool true on success, false on failure
138+
* @return bool true on success, false on failure or empty $dateFieldValue
139139
*/
140140
protected final function validateExpectedFieldDateFormat($dateFieldValue, $dateFormat)
141141
{
142-
if (empty($dateFieldValue)) {
143-
return true;
144-
}
145-
146142
$date = \DateTime::createFromFormat($dateFormat, $dateFieldValue);
147143

148144
if (!$date) {

0 commit comments

Comments
 (0)
0