mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Fixed variable name, $field
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
181bafd012
commit
b0ddb26e73
|
@ -565,7 +565,7 @@ abstract class Importer
|
|||
*/
|
||||
public function parseOrNullDate($field, $format = 'date') {
|
||||
|
||||
$format = 'Y-m-d';
|
||||
$date_format = 'Y-m-d';
|
||||
|
||||
if ($format == 'datetime') {
|
||||
$date_format = 'Y-m-d H:i:s';
|
||||
|
@ -577,7 +577,7 @@ abstract class Importer
|
|||
$value = CarbonImmutable::parse($this->item[$field])->format($date_format);
|
||||
return $value;
|
||||
} catch (\Exception $e) {
|
||||
$this->log('Unable to parse date: ' . $this->item['next_audit_date']);
|
||||
$this->log('Unable to parse date: ' . $this->item[$field]);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue