mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
check if date of file can be parsed
This commit is contained in:
parent
e86aeff722
commit
9d37187e43
|
@ -811,7 +811,11 @@ function insert_document($document) { /* {{{ */
|
|||
$file['attributes']['version'],
|
||||
$file['attributes']['public']
|
||||
);
|
||||
$newfile->setDate(dateToTimestamp($file['attributes']['date']));
|
||||
$d = dateToTimestamp($file['attributes']['date']);
|
||||
if($d)
|
||||
$newfile->setDate($d);
|
||||
else
|
||||
$logger->warning("File date (".$file['attributes']['date'].") could not be parsed.");
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user