Skip to content

Commit 7d1d364

Browse files
committed
✨ set max_nested_depth default value
1 parent 4fb4268 commit 7d1d364

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Drivers/Standard/ParamsValidator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ public function validateScopes(Request $request): void
4848
public function validateFilters(Request $request): void
4949
{
5050
$max_depth = ceil(($this->getArrayDepth($request->all()['filters'])) / 2) - 1;
51+
$config_max_nested_depth = config('orion.search.max_nested_depth', 1);
5152

52-
abort_if($max_depth > config('orion.search.max_nested_depth'), 422, __('Max nested depth :depth is exceeded', ['depth' => config('orion.search.max_nested_depth')]));
53+
abort_if($max_depth > $config_max_nested_depth, 422, __('Max nested depth :depth is exceeded', ['depth' => $config_max_nested_depth]));
5354

5455
Validator::make(
5556
$request->all(),

0 commit comments

Comments
 (0)