Error exporting reports on 7.8.31

I just upgraded to the latest 7.8 branch release and previously working reports now give me a 500 error:

Uncaught Error: Call to a member function format() on null in /modules/AOR_Reports/AOR_Report.php:1909

This is the line in question:

                        $date = getPeriodEndDate($params)->format('Y-m-d H:i:s');

I’m not really an expert in PHP enough to diagnose, anyone have any ideas?

I think the problem is I’m using the parameter “last week” in the report. When I use before a specific date, it works.

Found a similar issue on Github, and there is a fix!!!

https://github.com/salesagility/SuiteCRM/issues/6036

Fix:

https://github.com/Dillon-Brown/SuiteCRM/commit/1de45d793d73fb69973499f9de79d87fcef389a0#diff-5c2a4f193364eee2a475483cd95c0d93

This works great!

I think that this is the pr for that error (but I am not quite sure):
https://github.com/salesagility/SuiteCRM/pull/3612/files

1 Like

Thanks @amariussi if I have any other problems I’ll try that too. The fix I posted above did fix the error I was having.

1 Like