mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-18 18:40:12 +00:00
Fix bad call to method.
This commit is contained in:
@@ -69,18 +69,18 @@ trait AppendsLocationData
|
||||
if ($isValidPOST) {
|
||||
Log::debug('Method is POST and all fields present and not NULL.');
|
||||
$data['store_location'] = true;
|
||||
$data['longitude'] = $this->string($longitudeKey);
|
||||
$data['latitude'] = $this->string($latitudeKey);
|
||||
$data['zoom_level'] = $this->string($zoomLevelKey);
|
||||
$data['longitude'] = $this->convertString($longitudeKey);
|
||||
$data['latitude'] = $this->convertString($latitudeKey);
|
||||
$data['zoom_level'] = $this->convertString($zoomLevelKey);
|
||||
}
|
||||
|
||||
// for a PUT (api update) or POST update (UI)
|
||||
if ($isValidPUT) {
|
||||
Log::debug('Method is PUT and all fields present and not NULL.');
|
||||
$data['update_location'] = true;
|
||||
$data['longitude'] = $this->string($longitudeKey);
|
||||
$data['latitude'] = $this->string($latitudeKey);
|
||||
$data['zoom_level'] = $this->string($zoomLevelKey);
|
||||
$data['longitude'] = $this->convertString($longitudeKey);
|
||||
$data['latitude'] = $this->convertString($latitudeKey);
|
||||
$data['zoom_level'] = $this->convertString($zoomLevelKey);
|
||||
}
|
||||
if ($isValidEmptyPUT) {
|
||||
Log::debug('Method is PUT and all fields present and NULL.');
|
||||
|
@@ -51,7 +51,7 @@ trait ConvertsDataTypes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function string(string $field): string
|
||||
public function convertString(string $field): string
|
||||
{
|
||||
return $this->clearString((string) ($this->get($field) ?? ''), false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user