You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If some PDFReports are declared the Cron Task stops with an Error.
In the class Piwik_PDFReports the function getScheduledTasks (piwik/plugins/PDFReports/PDFReports.php, 40) calls Piwik_Date::factory (piwik/core/Date.php, 45) on line 49 and this factory expects a string as the first argument, but Piwik_PDFReports gives it a Piwik_Date Object. Solution to this problem was to call getTimestamp() on that Object to meet the requirements of the factory function. Actually I didn't know if you expect a UTC time or the Time with the Timezone in, so either getTimestamp() oder getTimestampUTC() might be correct.
I changed:
$baseDate = Piwik_Date::factory("1971-01-01");
foreach($sites as &$site)
{
$offsetDate = Piwik_Date::factory($baseDate, $site['timezone']);
// Earlier means a negative timezone
if ( $offsetDate->isEarlier($baseDate) )
{
to:
$baseDate = Piwik_Date::factory("1971-01-01");
foreach($sites as &$site)
{
$offsetDate = Piwik_Date::factory($baseDate->getTimestamp(), $site['timezone']);
// Earlier means a negative timezone
if ( $offsetDate->isEarlier($baseDate) )
{
Keywords: nasty bug
The text was updated successfully, but these errors were encountered:
If some PDFReports are declared the Cron Task stops with an Error.
In the class Piwik_PDFReports the function getScheduledTasks (piwik/plugins/PDFReports/PDFReports.php, 40) calls Piwik_Date::factory (piwik/core/Date.php, 45) on line 49 and this factory expects a string as the first argument, but Piwik_PDFReports gives it a Piwik_Date Object. Solution to this problem was to call getTimestamp() on that Object to meet the requirements of the factory function. Actually I didn't know if you expect a UTC time or the Time with the Timezone in, so either getTimestamp() oder getTimestampUTC() might be correct.
I changed:
to:
Keywords: nasty bug
The text was updated successfully, but these errors were encountered: