salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.44k stars 2.07k forks source link

Fatal error in AOR Reports dashlet #10353

Open fluffyballs opened 8 months ago

fluffyballs commented 8 months ago

Issue

When loading the dashboard containing an AOR Reports dashlet which is linked to a deleted report a fatal error is thrown. PHP Fatal error: Uncaught Error: Attempt to assign property "user_parameters" on bool in xx/modules/AOR_Reports/Dashlets/AORReportsDashlet/AORReportsDashlet.php:44

Expected Behavior

The dashboard should load without issue.

Actual Behavior

The dashboard fails to load and the following error is thrown: PHP Fatal error: Uncaught Error: Attempt to assign property "user_parameters" on bool in xx/modules/AOR_Reports/Dashlets/AORReportsDashlet/AORReportsDashlet.php:44

Possible Fix

Check report exists before trying to use it.

Steps to Reproduce

  1. Create a report
  2. Add report dashlet to dashboard and select the newly created report
  3. Delete the report
  4. Reload the dashboard

Context

High priority - Dashboard unusable

Your Environment

serhiisamko091184 commented 8 months ago

Hello @fluffyballs,

thanks for the issue raised and the fix provided.

Regards, Serhii