Closed patdunlavey closed 6 months ago
Hi, thanks for reporting. Give me a few minutes to debug, we have plenty of archipelago's running this code base without erroring and since i was sure (no longer) i had fixed all trims i saw in November i want to be sure there is not another issue somewhere. Will report back in 30 min with a fix. Thanks!
@patdunlavey ok. It does not hurt to check for a null before trimming or even better, only trim strings. In my memory the flattener would had already dealt with empty values but seems like it is not. I will check if this is also a behavior that happens somewhere else. Pull coming in 15. Thanks
Seeing a lot of these messages while indexing content:
https://github.com/esmero/strawberryfield/blob/8a31b805363409e3dde4e7ec11b4dd0dd12d780e/src/Plugin/DataType/StrawberryValuesFromJson.php#L76
It presumes that every value in the array
$flattened[$needle]
is a string, where evidently that may not be the case.Is the fix for this to simply catch cases where the value is null and either remove it, or convert it to an empty string? Or is this indicative of a condition that should not occur?