Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

PDFReports: misc/cron/archive.sh launches an exception #1661

Closed
anonymous-piwik-user opened this Issue · 3 comments

2 participants

Anonymous Piwik user Anthon Pang
Anonymous Piwik user

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

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);
                }
        }

?

Anthon Pang
Collaborator

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

Anthon Pang
Collaborator

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

Anonymous Piwik user anonymous-piwik-user added this to the Piwik 1.1 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.