Commit e1a20c29 authored by Matthias Larisch's avatar Matthias Larisch

Replace floatval by float cast

parent 1c54a3c0
......@@ -761,8 +761,8 @@ Verantwortlich für den Inhalt nach § 55 Abs. 2 RStV:<br />
if ($pos = $this->session->get('blocation')) {
$location = [
'lat' => floatval($pos['lat']),
'lon' => floatval($pos['lon']),
'lat' => (float)$pos['lat'],
'lon' => (float)$pos['lon'],
];
}
......
......@@ -99,8 +99,8 @@ class EventGateway extends BaseGateway
return $this->db->insert('fs_location', [
'name' => strip_tags($location_name),
'lat' => floatval($lat),
'lon' => floatval($lon),
'lat' => (float)$lat,
'lon' => (float)$lon,
'zip' => strip_tags($zip),
'city' => strip_tags($city),
'street' => strip_tags($address)
......
......@@ -33,8 +33,8 @@ class GeoCleanXhr extends Control
if (!$this->session->may('orga')) {
return XhrResponses::PERMISSION_DENIED;
}
$lat = floatval($_GET['lat']);
$lon = floatval($_GET['lon']);
$lat = (float)$_GET['lat'];
$lon = (float)$_GET['lon'];
$fsid = (int)$_GET['id'];
if ($this->model->updateGeo($fsid, $lat, $lon)) {
......
......@@ -197,8 +197,8 @@ class LoginXhr extends Control
}
$data['birthdate'] = $birthdate->format('Y-m-d');
$data['mobile_phone'] = strip_tags($data['mobile_phone'] ?? null);
$data['lat'] = floatval($data['lat'] ?? null);
$data['lon'] = floatval($data['lon'] ?? null);
$data['lat'] = (float)$data['lat'] ?? null;
$data['lon'] = (float)$data['lon'] ?? null;
$data['str'] = strip_tags($data['str'] ?? null);
$data['plz'] = preg_replace('[^0-9]', '', $data['plz'] ?? null) . '';
$data['city'] = strip_tags($data['city'] ?? null);
......
......@@ -17,8 +17,8 @@ class MapXhr extends Control
public function savebpos()
{
$lat = floatval($_GET['lat']);
$lon = floatval($_GET['lon']);
$lat = (float)$_GET['lat'];
$lon = (float)$_GET['lon'];
$this->session->set('blocation', array(
'lat' => $lat,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment