From 59669e939547aec2d4c242694dd6109d4deeb392 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 13 Aug 2018 17:38:55 +0100 Subject: Cannot edit a null place location --- app/Http/Controllers/AdminLocationController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/AdminLocationController.php b/app/Http/Controllers/AdminLocationController.php index cf323b7206..c8dd2962cf 100644 --- a/app/Http/Controllers/AdminLocationController.php +++ b/app/Http/Controllers/AdminLocationController.php @@ -827,8 +827,8 @@ class AdminLocationController extends AbstractBaseController $json = [ 'zoom' => (int) $row->pl_zoom ?: 2, 'coordinates' => [ - (float) strtr($row->pl_lati, ['N' => '', 'S' => '-', ',' => '.']), - (float) strtr($row->pl_long, ['E' => '', 'W' => '-', ',' => '.']), + (float) strtr($row->pl_lati ?? '0', ['N' => '', 'S' => '-', ',' => '.']), + (float) strtr($row->pl_long ?? '0', ['E' => '', 'W' => '-', ',' => '.']), ], ]; } -- cgit v1.3