As of PHP 8.1 I found when rendering a page that used office hours and Metatag/Schema.org Metatag to add office hours to structured data, I started to see these warnings in logs:
Message Warning: Undefined array key "" in office_hours_tokens() (line 45 of /var/www/html/docroot/modules/contrib/office_hours/office_hours.tokens.inc)
Not all days were set in the office hours on that node but all days were being referred to as tokens in Metatag/Schema.org Metatag, [node:field_opening_hours:0:day], [node:field_opening_hours:1:day], [node:field_opening_hours:2:day], [node:field_opening_hours:3:day], [node:field_opening_hours:4:day], [node:field_opening_hours:5:day], [node:field_opening_hours:6:day]
. This led to Metatag/Schema.org Metatag requesting an index of the office hours that did not exist via the token hook.
Create a node with office hours and do not fill all days.
Add Metatag/Schema.org Metatag entries for that node type and use all seven indexes. Or more if you'd like, as that would also lead to these warnings.
Navigate to node.
Check field index is not null before accessing in token replacement.
I shall follow this issue with a patch/issue fork shortly.
Fixed
1.7
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.