From ee9c9f6f0f727384284fbe76338864a2c3eb7d8c Mon Sep 17 00:00:00 2001 From: neomerx Date: Mon, 2 Mar 2020 10:47:10 +0300 Subject: [PATCH] Close #243 --- src/Http/Query/BaseQueryParserTrait.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Http/Query/BaseQueryParserTrait.php b/src/Http/Query/BaseQueryParserTrait.php index 4a81af0f..026fc9bb 100644 --- a/src/Http/Query/BaseQueryParserTrait.php +++ b/src/Http/Query/BaseQueryParserTrait.php @@ -37,10 +37,10 @@ trait BaseQueryParserTrait protected function getIncludes(array $parameters, string $errorTitle): iterable { if (\array_key_exists(P::PARAM_INCLUDE, $parameters) === true) { - $paramName = P::PARAM_INCLUDE; - $includes = $parameters[$paramName]; - foreach ($this->splitCommaSeparatedStringAndCheckNoEmpties($paramName, $includes, $errorTitle) as $path) { - yield $path => $this->splitStringAndCheckNoEmpties($paramName, $path, '.', $errorTitle); + $includes = $parameters[P::PARAM_INCLUDE]; + $paths = $this->splitCommaSeparatedStringAndCheckNoEmpties(P::PARAM_INCLUDE, $includes, $errorTitle); + foreach ($paths as $path) { + yield $path => $this->splitStringAndCheckNoEmpties(P::PARAM_INCLUDE, $path, '.', $errorTitle); } } }