Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Bug in pChart library - Piwik 3.0.1 + PHP 7.1.1 Win64

$
0
0

@Ivo_Ivanov wrote:

I have installed Piwik version 3.0.1 in a Windows box, running it within Apache 2.4.25 x64 and PHP 7.1.1 VC14 x64 TS.
When downloding a PDF report that contains graphs (i.e. there is some data to report) the browser shows only the following error:
Piwik encoutered an error: Cannot use string offset as an array (which lead to: Cannot use string offset as an array)

I debuged Piwik with xDebug and in the end the error comes from pData.php file (within pChart library) at line 80 that reads
$this->Data["Axis"][0]["Display"] = AXIS_FORMAT_DEFAULT;
I am guessing the problem is because Data is initialised as "" a few lines above this one. Seems like in PHP 7 that is not allowed anymore. Or probably first $this->Data["Axis"] must be initialized as an array. I am not a PHP guru, I am only guessing here. I will appriciate if someone can point out the fix for this.

Note that if no graph is to be generated then the report is created correctly.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles