foreach() ERROR in ttReportHelper.class.php on line 1617

Discussion forum about Anuko Time Tracker
Post Reply
belgvr
Posts: 2
Joined: Tue Oct 08, 2019 9:50 pm

foreach() ERROR in ttReportHelper.class.php on line 1617

Post by belgvr » Tue Oct 08, 2019 9:51 pm

PHP Warning: Invalid argument supplied for foreach() in C:\inetpub\wwwroot\timeclock\WEB-INF\lib\ttReportHelper.class.php on line 1617

This is what i get when trying to generate a report.

Nik
Posts: 489
Joined: Wed May 26, 2010 5:55 pm

Re: foreach() ERROR in ttReportHelper.class.php on line 1617

Post by Nik » Wed Oct 16, 2019 4:51 pm

It was happening because the array of inactive users is NULL (no inactive users selected).

Nothing to worry about, but fixed and got rid of the warning in version 1.19.12.5159.

belgvr
Posts: 2
Joined: Tue Oct 08, 2019 9:50 pm

Re: foreach() ERROR in ttReportHelper.class.php on line 1617

Post by belgvr » Wed Oct 16, 2019 6:35 pm

Nik wrote:
Wed Oct 16, 2019 4:51 pm
It was happening because the array of inactive users is NULL (no inactive users selected).

Nothing to worry about, but fixed and got rid of the warning in version 1.19.12.5159.
and how did you fix it?

Nik
Posts: 489
Joined: Wed May 26, 2010 5:55 pm

Re: foreach() ERROR in ttReportHelper.class.php on line 1617

Post by Nik » Wed Oct 16, 2019 7:31 pm

By casting to array whatever $bean->getAttribute() returns. See changes here.

Post Reply