From c6f23b8bed5cade00ed73b21481d6adb7b8fe5a3 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sat, 4 Jun 2022 08:21:01 -0700 Subject: [PATCH] force x and y to ints --- p3k/geo/StaticMap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/p3k/geo/StaticMap.php b/p3k/geo/StaticMap.php index d158e17..4700565 100644 --- a/p3k/geo/StaticMap.php +++ b/p3k/geo/StaticMap.php @@ -307,6 +307,7 @@ function generate($params, $filename, $assetPath) { $urls = array(); for($x = $swTile['x']; $x <= $neTile['x']; $x++) { + $x = (int)$x; if(!array_key_exists($x, $tiles)) { $tiles[$x] = array(); $overlays[$x] = array(); @@ -315,6 +316,7 @@ function generate($params, $filename, $assetPath) { } for($y = $swTile['y']; $y <= $neTile['y']; $y++) { + $y = (int)$y; $url = urlForTile($x, $y, $zoom, $tileURL); $urls[] = $url; $tiles[$x][$y] = false;