Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow getMediasByTag to GraphQL or data access (#1020)
Upgrading a project to php 8 I lost the functionality of `getMediasByTag()` only ever getting a empty array. It looks like a PR changed the array key from ['graphql'] to ['data'] yet 'data' doesn't exist on the responses I get, while 'graphql' does. On the potential that the response might A) differ from time to time or B) somehow be different based on the request origin or something (i.e. I can't prove ['data'] doesn't work for others, while my ['graphql'] doesn't) I propose the following fallback 'reversion' - check for the existence of ['graphql'] then try ['data'] if it's not found.
- Loading branch information