Illegal string offset 'vote_average' in Drupal\fivestar\Element\Fivestar::process()

Created on 13 February 2023, almost 2 years ago
Updated 19 August 2023, over 1 year ago

Problem/Motivation

Warning: Illegal string offset 'vote_average' in Drupal\fivestar\Element\Fivestar::process() (line 89 of /var/www/html/web/modules/contrib/fivestar/src/Element/Fivestar.php)

πŸ› Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine niko-

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

Comments & Activities

  • Issue created by @niko-
  • Status changed to Postponed: needs info almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    That code has changed since alpha2. Your patch doesn't apply, and I suspect you won't even get that error if you use the current -dev. Please test with the current -dev.

  • Issue was unassigned.
  • Status changed to Closed: cannot reproduce over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    I am not able to reproduce this. I asked for more information 1 week after this issue was posted, but now 6 months later I still have not gotten any response.

    If this issue affects you and is still a problem in the current -dev, then please post here with more details.

    Checking isset() or emtpy() is almost never the right thing to do. If a variable isn't set, then it wasn't properly initialized, and the correct solution is to make sure it is initialed - trying to avoid the problem by testing (everywhere the variable is used) to see whether the variable is set then using NULL if it's not set is not a solution, because NULL is almost never a valid value. All this does is avoid an error message - it doesn't make the module work properly.

Production build 0.71.5 2024