Skip to content

Commit

Permalink
fix: potential null passed to ltrim() in LocationsController
Browse files Browse the repository at this point in the history
  • Loading branch information
Fenrikur committed Aug 26, 2024
1 parent 0fd1d64 commit cd471d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/Admin/LocationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function save(Request $request): Response

$location->name = $data['name'];
$location->description = $data['description'];
$location->dect = ltrim($data['dect'], '@');
$location->dect = array_key_exists('dect', $data) && !empty($data['dect']) ? ltrim($data['dect'], '@') : null;
$location->map_url = $data['map_url'];

$location->save();
Expand Down

0 comments on commit cd471d0

Please sign in to comment.