fixed API response for php format with multidimensional arrays

This should fix invalid response from API, where are multidimensional arrays in the result. ScheduledReports.getReports is the one i tested it with. The current response is `Array` and produces a warning:
```
Notice: Array to string conversion in core/dispatch.php on line 33
Backtrace -->

 #0 Piwik\Error::errorHandler(...) called at [core/dispatch.php:33]
 #1 require_once(...) called at [index.php:47]
```

I tested this only with this one api call, so not sure if this is even a proper fix.