If PDF file has some meta fields with no values (see example below), there is a warning generated in PHP 8 because the call to GeneralUtility::trimExplode on this line returns an array with one field only.
Fix is to set third parameter of GeneralUtility::trimExplode to false, so an array with two fields is always returned. If empty values should not be included in metadata, they can be filtered afterwards.
If PDF file has some meta fields with no values (see example below), there is a warning generated in PHP 8 because the call to
GeneralUtility::trimExplode
on this line returns an array with one field only.Example:
Fix is to set third parameter of
GeneralUtility::trimExplode
to false, so an array with two fields is always returned. If empty values should not be included in metadata, they can be filtered afterwards.