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”][“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.
I faced the same issue.
I was digging into the code a little bit and this issue is caused by PHP 7.1 and the changed behavior of type conversion and the unavailability of the empty bracket operator.
Note: As of PHP 7.1.0, applying the empty index operator on a string throws a fatal error. Formerly, the string was silently converted to an array.
(taken from PHP: Arrays - Manual)
Actually, a code change needs to be implemented, which is replacing  with corresponding array_push calls (ref. PHP: array_push - Manual).
I have tested the implementation in libs\pChart\class\pData.class.php and it helped to fix the error message, but charts haven’t been displayed yet (assuming that other components are involved as well).
#example modification in pData.class.php:
$this->Data = array();
####replace empty bracket operator by array_push: $this->Data["Series"][$SerieName]["Data"] = $Value; array_push($this->Data["Series"][$SerieName]["Data"], $Value);