1

I'm setting up some scheduled jobs to email csv reports on a regular basis. I set up the job in scheduled jobs and whether I select "execute now" or run it through a cron job, I get this error: Warning: Invalid argument supplied for foreach() in //www/www/wp-content/plugins/civicrm/civicrm/CRM/Report/Utils/Report.php on line 264

I can go into Report.php and add a code check if the arguments sent to "foreach" are arrays (i.e. (is_array($rows)) ), and then it runs without any warning. But, I don't want to be administering a system that I have to go in and modify Report.php. I don't see anyone else with this error. Any ideas why I'd be getting it?

  • which report exactly and which CiviCRM version? – Catorghans Feb 3 '16 at 7:41
  • Constituent Details report, version 4.7 – Iantha Scheiwe Feb 3 '16 at 9:58
  • 1
    I believe it is related to selected the "Constituent Details" report instead of "Constituent Summary" and the error is actually triggered relative to the csv output request, which I did not realize was affecting the warning. I will do more testing tomorrow to verify that the result is tied to the initial report selection I made. This is what clued me in to the difference in the reports - it is an old entry, but still seems to be relevant in my case. forum.civicrm.org/index.php?topic=17001.0 – Iantha Scheiwe Feb 3 '16 at 12:49
0

The "Constituent Details" report template is not designed for export to csv, so if that is wanted it is better to select "Constituent Summary" template to create the desire contact report. In this case, the csv is produced and emailed properly.

In my case, I still receive some run-time errors while the report is running, but it does not negatively affect the output that I need.

  • Are you able to accept your own answer so this can be closed off – petednz - fuzion Nov 16 '18 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.