From f6f4d4490269b24315a1c65b43450ac7a800babc Mon Sep 17 00:00:00 2001 From: jjrom Date: Mon, 13 Jan 2025 11:31:23 +0100 Subject: [PATCH] Correct issue on POST /search on bbox --- app/resto/core/RestoConstants.php | 2 +- app/resto/core/api/STACAPI.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/resto/core/RestoConstants.php b/app/resto/core/RestoConstants.php index 87d76e5b..c09ab8f5 100644 --- a/app/resto/core/RestoConstants.php +++ b/app/resto/core/RestoConstants.php @@ -20,7 +20,7 @@ class RestoConstants // [IMPORTANT] Starting resto 7.x, default routes are defined in RestoRouter class // resto version - const VERSION = '9.5.7'; + const VERSION = '9.5.8'; /* ============================================================ * NEVER EVER TOUCH THESE VALUES diff --git a/app/resto/core/api/STACAPI.php b/app/resto/core/api/STACAPI.php index e84afdf1..a0203091 100644 --- a/app/resto/core/api/STACAPI.php +++ b/app/resto/core/api/STACAPI.php @@ -1565,7 +1565,7 @@ private function jsonQueryToKVP($jsonQuery) * Input bbox should be an array of 4 floats */ if ( isset($jsonQuery['bbox']) ) { - if ( is_array($jsonQuery['bbox']) || count($jsonQuery['bbox']) !== 4 ) { + if ( !is_array($jsonQuery['bbox']) || count($jsonQuery['bbox']) !== 4 ) { RestoLogUtil::httpError(400, 'Invalid bbox parameter. Should be an array of 4 coordinates'); } $params['bbox'] = join(',', $jsonQuery['bbox']);