Donut chart doesn't work after updating to PHP 8

Created on 30 August 2022, about 2 years ago
Updated 27 January 2023, almost 2 years ago

After updating to PHP 8, when using a donut chart, you get this error:

Message TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in count() (line 193 of .../charts/modules/charts_highcharts/src/Plugin/chart/Highcharts.php

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Highcharts integration

Created by

πŸ‡ΊπŸ‡ΈUnited States yojohnyo

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.

  • Thanks for the patch, @yojohnyo!
    I had the same error and this patch fixed it.

  • Actually this patch is not working with version 3.4
    I manually made the changes on my local file and I thought that the patch is going to work, but in this version the modified line is a little bit bellow and the patch is failing.

    Anyway, I made a new patch which is working with the 3.4 version.

Production build 0.71.5 2024