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 /> ...@@ -761,8 +761,8 @@ Verantwortlich für den Inhalt nach § 55 Abs. 2 RStV:<br />
if ($pos = $this->session->get('blocation')) { if ($pos = $this->session->get('blocation')) {
$location = [ $location = [
'lat' => floatval($pos['lat']), 'lat' => (float)$pos['lat'],
'lon' => floatval($pos['lon']), 'lon' => (float)$pos['lon'],
]; ];
} }
......
...@@ -99,8 +99,8 @@ class EventGateway extends BaseGateway ...@@ -99,8 +99,8 @@ class EventGateway extends BaseGateway
return $this->db->insert('fs_location', [ return $this->db->insert('fs_location', [
'name' => strip_tags($location_name), 'name' => strip_tags($location_name),
'lat' => floatval($lat), 'lat' => (float)$lat,
'lon' => floatval($lon), 'lon' => (float)$lon,
'zip' => strip_tags($zip), 'zip' => strip_tags($zip),
'city' => strip_tags($city), 'city' => strip_tags($city),
'street' => strip_tags($address) 'street' => strip_tags($address)
......
...@@ -33,8 +33,8 @@ class GeoCleanXhr extends Control ...@@ -33,8 +33,8 @@ class GeoCleanXhr extends Control
if (!$this->session->may('orga')) { if (!$this->session->may('orga')) {
return XhrResponses::PERMISSION_DENIED; return XhrResponses::PERMISSION_DENIED;
} }
$lat = floatval($_GET['lat']); $lat = (float)$_GET['lat'];
$lon = floatval($_GET['lon']); $lon = (float)$_GET['lon'];
$fsid = (int)$_GET['id']; $fsid = (int)$_GET['id'];
if ($this->model->updateGeo($fsid, $lat, $lon)) { if ($this->model->updateGeo($fsid, $lat, $lon)) {
......
...@@ -197,8 +197,8 @@ class LoginXhr extends Control ...@@ -197,8 +197,8 @@ class LoginXhr extends Control
} }
$data['birthdate'] = $birthdate->format('Y-m-d'); $data['birthdate'] = $birthdate->format('Y-m-d');
$data['mobile_phone'] = strip_tags($data['mobile_phone'] ?? null); $data['mobile_phone'] = strip_tags($data['mobile_phone'] ?? null);
$data['lat'] = floatval($data['lat'] ?? null); $data['lat'] = (float)$data['lat'] ?? null;
$data['lon'] = floatval($data['lon'] ?? null); $data['lon'] = (float)$data['lon'] ?? null;
$data['str'] = strip_tags($data['str'] ?? null); $data['str'] = strip_tags($data['str'] ?? null);
$data['plz'] = preg_replace('[^0-9]', '', $data['plz'] ?? null) . ''; $data['plz'] = preg_replace('[^0-9]', '', $data['plz'] ?? null) . '';
$data['city'] = strip_tags($data['city'] ?? null); $data['city'] = strip_tags($data['city'] ?? null);
......
...@@ -17,8 +17,8 @@ class MapXhr extends Control ...@@ -17,8 +17,8 @@ class MapXhr extends Control
public function savebpos() public function savebpos()
{ {
$lat = floatval($_GET['lat']); $lat = (float)$_GET['lat'];
$lon = floatval($_GET['lon']); $lon = (float)$_GET['lon'];
$this->session->set('blocation', array( $this->session->set('blocation', array(
'lat' => $lat, '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