@anonymous-piwik-user opened this Issue on August 31st 2010

Find below the exception:

PHP Fatal error:  Call to undefined method Piwik_PDFReports::getReports() in /path/to/piwik-1.0/plugins/PDFReports/API.php on line 307
getReports()``` belongs to```
Piwik_PDFReports_API``` class and, now (far from v0.7, http://dev.piwik.org/trac/changeset?new=2989%40trunk%2Fplugins%2FPDFReports%2FPDFReports.php&old=2767%40trunk%2Fplugins%2FPDFReports%2FPDFReports.php#file0) PDFReports scheduled tasks send emails through a static call within the context of```
Piwik_PDFReports```:

class Piwik_PDFReports extends Piwik_Plugin
{
...
function generateAndSendScheduledReports($period)
{
...
// For each, generate the file and send the message with the attached report
foreach($reportsToGenerate as $report)
{
Piwik_PDFReports_API::sendEmailReport( $report['idreport'],
$report['idsite'],
$period);
}
}

@anonymous-piwik-user commented on August 31st 2010

Maybe:

--- piwik-1.0/plugins/PDFReports/PDFReports.php        2010-08-31 14:20:28.000000000 +0200
+++ piwik/plugins/PDFReports/PDFReports.php    2010-08-31 14:21:19.000000000 +0200
@@ -68,9 +68,9 @@
                // For each, generate the file and send the message with the attached report
                foreach($reportsToGenerate as $report)
                {
-                       Piwik_PDFReports_API::sendEmailReport(  $report['idreport'],
-                                                                                                       $report['idsite'],
-                                                                                                       $period);
+                       Piwik_PDFReports_API::getInstance()->sendEmailReport(   $report['idreport'],
+                                                                                                                                $report['idsite'],
+                                                                                                                                $period);
                }
        }

?

@robocoder commented on August 31st 2010 Contributor

(In [3038]) fixes #1661 - $this not set correctly; thanks scara

@robocoder commented on September 3rd 2010 Contributor

(In [3042]) refs #1661 - propset svn:executable on archive.sh

This Issue was closed on September 3rd 2010
Powered by GitHub Issue Mirror