Archive.php SCHEDULED TASKS error

We have archive.php running every hour for around 700 sites. It usually runs fine without error. Except that every Monday we get errors like this:


SCHEDULED TASKS
Starting Scheduled tasks... 
ERROR: Got invalid response from API request: http://OURDOMAIN/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=OURTOKEN&trigger=archivephp. Response was '<div style='word-wrap: break-word; border: 3px solid red; padding:4px; width:70%; background-color:#FFFF96;'>
        <strong>There is an error. Please report the message (Piwik 1.12)
        and full backtrace in the <a href='?module=Proxy&action=redirect&url=http://forum.piwik.org' target='_blank'>Piwik forums</a> (please do a Search first as it might have been reported already!).<br /><br/>
        Notice:</strong> <i>Undefined variable: message</i> in <b>/var/www/html/piwik/plugins/PDFReports/PDFReports.php</b> on line <b>347</b>
<br /><br />Backtrace --><div style="font-family:Courier;font-size:10pt"><br />
#0  Piwik_ErrorHandler(...) called at [/var/www/html/piwik/plugins/PDFReports/PDFReports.php:347]<br />
#1  Piwik_PDFReports->sendReport(...) called at [:]<br />
#2  call_user_func_array(...) called at [/var/www/html/piwik/libs/Event/Dispatcher.php:284]<br />
#3  Event_Dispatcher->postNotification(...) called at [/var/www/html/piwik/core/PluginsManager.php:674]<br />
#4  Piwik_PostEvent(...) called at [/var/www/html/piwik/plugins/PDFReports/API.php:535]<br />
#5  Piwik_PDFReports_API->sendReport(...) called at [:]<br />
#6  call_user_func(...) called at [/var/www/html/piwik/core/TaskScheduler.php:157]<br />
#7  Piwik_TaskScheduler::executeTask(...) called at [/var/www/html/piwik/core/TaskScheduler.php:72]<br />
#8  Piwik_TaskScheduler::runTasks(...) called at [/var/www/html/piwik/plugins/CoreAdminHome/API.php:38]<br />
#9  Piwik_CoreAdminHome_API->runScheduledTasks(...) called at [:]<br />
#10  call_user_func_array(...) called at [/var/www/html/piwik/core/API/Proxy.php:188]<br />
#11  Piwik_API_Proxy->call(...) called at [/var/www/html/piwik/core/API/Request.php:145]<br />
#12  Piwik_API_Request->process(...) called at [/var/www/html/piwik/plugins/API/Controller.php:25]<br />
#13  Piwik_API_Controller->index(...) called at [:]<br />
#14  call_user_func_array(...) called at [/var/www/html/piwik/core/FrontController.php:125]<br />
#15  Piwik_FrontController->dispatch(...) called at [/var/www/html/piwik/index.php:47]</div><br />
 </pre></div><br />task,output
Piwik_PDFReports_API.sendReport_425,Time elapsed: 1.124s'

Is there a known issue with SCHEDULED TASKS phase of archiving? Is there a suggested fix?

Would you be able to setup a new piwik (copying the config/config.ini.php file) from GIT Piwik 2.0 alpha? would be interesting to know as this bug may be fixed.

Unfortunately, I don’t see how that could help. It looks like the error is with the code that sends email reports, right? To test properly with a new piwik version, we would need to run the archive script with the new code and the live production data. There would be risks of sending double email reports to clients, etc. I would like to help test it, but I just don’t think we can in a production environment.

Anything else less drastic I could try? If you know specifically which code might fix this and could point me to the files and lines that changed, and if the changes are few enough, I could possible test those specific changes in production.

Some of our clients are reporting receiving duplicates of their weekly email reports from Piwik. I suspect this may be related to the errors during SCHEDULED TASKS of archive.php. Does that seem likely?