Skip to content

Commit

Permalink
PHP 8.1+: null-passing to trim in advanced search
Browse files Browse the repository at this point in the history
  • Loading branch information
zerocrates committed Dec 21, 2022
1 parent 9bcc1d9 commit 690b2ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions views/shared/map/advanced-search-partial.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
$isMapRequest = $request->getModuleName() == 'geolocation';

// Get the address, latitude, longitude, and the radius from parameters
$address = trim($request->getParam('geolocation-address'));
$currentLat = trim($request->getParam('geolocation-latitude'));
$currentLng = trim($request->getParam('geolocation-longitude'));
$radius = trim($request->getParam('geolocation-radius'));
$address = trim((string) $request->getParam('geolocation-address'));
$currentLat = trim((string) $request->getParam('geolocation-latitude'));
$currentLng = trim((string) $request->getParam('geolocation-longitude'));
$radius = trim((string) $request->getParam('geolocation-radius'));
$mapped = $request->getParam('geolocation-mapped');

if (empty($radius)) {
Expand Down

0 comments on commit 690b2ad

Please sign in to comment.