mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Fix #2001
This commit is contained in:
@@ -58,20 +58,19 @@ class TagFactory
|
||||
{
|
||||
$zoomLevel = 0 === (int)$data['zoom_level'] ? null : (int)$data['zoom_level'];
|
||||
$latitude = 0.0 === (float)$data['latitude'] ? null : (float)$data['latitude'];
|
||||
$longitude = 0.0 === (float)$data['longitude'] ? null : (int)$data['longitude'];
|
||||
$longitude = 0.0 === (float)$data['longitude'] ? null : (float)$data['longitude'];
|
||||
$array = [
|
||||
'user_id' => $this->user->id,
|
||||
'tag' => trim($data['tag']),
|
||||
'tagMode' => 'nothing',
|
||||
'date' => $data['date'],
|
||||
'description' => $data['description'],
|
||||
'latitude' => $latitude,
|
||||
'longitude' => $longitude,
|
||||
'zoomLevel' => $zoomLevel,
|
||||
];
|
||||
|
||||
return Tag::create(
|
||||
[
|
||||
'user_id' => $this->user->id,
|
||||
'tag' => trim($data['tag']),
|
||||
'tagMode' => 'nothing',
|
||||
'date' => $data['date'],
|
||||
'description' => $data['description'],
|
||||
'latitude' => $latitude,
|
||||
'longitude ' => $longitude,
|
||||
'zoomLevel' => $zoomLevel,
|
||||
]
|
||||
);
|
||||
return Tag::create($array);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user