Skip to content

Commit

Permalink
prevent error if report does not support multiple periods
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Mar 22, 2017
1 parent 25eb446 commit 672d9c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/ImageGraph/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Piwik\API\Request;
use Piwik\Archive\DataTableFactory;
use Piwik\Common;
use Piwik\DataTable\Simple;
use Piwik\Filesystem;
use Piwik\Period;
use Piwik\Piwik;
Expand Down Expand Up @@ -385,7 +386,7 @@ public function get(
$hasData = false;
$hasNonZeroValue = false;

if (!$isMultiplePeriod) {
if (!$isMultiplePeriod || $reportData instanceof Simple) {
$reportMetadata = $processedReport['reportMetadata']->getRows();

$i = 0;
Expand Down

0 comments on commit 672d9c3

Please sign in to comment.