Skip to content

Commit

Permalink
Correct issue on POST /search on bbox
Browse files Browse the repository at this point in the history
  • Loading branch information
jjrom committed Jan 13, 2025
1 parent e55d5e3 commit f6f4d44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/resto/core/RestoConstants.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/resto/core/api/STACAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit f6f4d44

Please sign in to comment.