Undefined index for tokens when no votes cast.

Created on 16 September 2020, over 4 years ago
Updated 10 August 2024, 4 months ago

When there are no votes for an entity the token replacement triggers the error

Notice: Undefined index: vote in votingapi_tokens_tokens() (line 74 of modules/custom/votingapi_tokens/votingapi_tokens.tokens.inc).

The attached patch returns NULL for the token replacement when votes have not been cast.
This issue was first pointed out in https://www.drupal.org/project/votingapi/issues/2961079#comment-13430073 β†’

πŸ› Bug report
Status

Needs work

Version

4.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada shaundychko

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024