Fix bad call to method.

This commit is contained in:
James Cole
2022-05-02 19:35:35 +02:00
parent cf89d93cec
commit 2b615cf757
49 changed files with 157 additions and 157 deletions

View File

@@ -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.');

View File

@@ -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);
}