You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using DatabaseQueryProcessor with returnFlattenObject=1 (only 1 record item expected on output instead of array of records), this method returns data without the $targetVariableName key specified via 'as' option return array_shift($processedRecordVariables);
while when returnFlattenObject is not set, the method returns the data under the $targetVariableName key [ $targetVariableName => $processedRecordVariables; ]
This could be resolved by changing the line 126 to something like $processedRecordVariables = $processedRecordVariables[0] ?? [];
without returning it and letting the line 132 to return the whole $processedData as usual - with the data appended under the $targetVariableName key on line 130.
Thanks for checking.
The text was updated successfully, but these errors were encountered:
…ueryProcessor
Add new flag `returnFlattenLegacy` (enabled by default),
if disabled and combined with `returnFlattenObject`
will return null instead of empty array if no records are found
and will respect "as" setting
Resolves: #797, #739
…ueryProcessor (#807)
Add new flag `returnFlattenLegacy` (enabled by default),
if disabled and combined with `returnFlattenObject`
will return null instead of empty array if no records are found
and will respect "as" setting
Resolves: #797, #739
When using DatabaseQueryProcessor with returnFlattenObject=1 (only 1 record item expected on output instead of array of records), this method returns data without the $targetVariableName key specified via 'as' option
return array_shift($processedRecordVariables);
while when returnFlattenObject is not set, the method returns the data under the $targetVariableName key
[ $targetVariableName => $processedRecordVariables; ]
Issue in file:
headless/Classes/DataProcessing/DatabaseQueryProcessor.php
Line 126 in c133e52
This could be resolved by changing the line 126 to something like
$processedRecordVariables = $processedRecordVariables[0] ?? [];
without returning it and letting the line 132 to return the whole $processedData as usual - with the data appended under the $targetVariableName key on line 130.
Thanks for checking.
The text was updated successfully, but these errors were encountered: