foreach errors during typical installation

Hello,

Doing a typical installation and providing the setup information, during the setup process I had this output:

[b]Creating SuiteCRM configuration file (config.php)

Creating SuiteCRM application tables, audit tables and relationship metadata

…
Warning: Invalid argument supplied for foreach() in /home/danowebs/public_html/crm/modules/AOR_Reports/AOR_Report.php on line 85
…

Creating default SuiteCRM data

 Creating default users...   done
 Creating default scheduler jobs...   done

Warning: Invalid argument supplied for foreach() in /home/danowebs/public_html/crm/modules/AOR_Reports/AOR_Report.php on line 85

Warning: Invalid argument supplied for foreach() in /home/danowebs/public_html/crm/modules/AOR_Reports/AOR_Report.php on line 85

Warning: Invalid argument supplied for foreach() in /home/danowebs/public_html/crm/modules/AOR_Reports/AOR_Report.php on line 85

Warning: Invalid argument supplied for foreach() in /home/danowebs/public_html/crm/modules/AOR_Reports/AOR_Report.php on line 85

The setup of SuiteCRM 7.1.2 is now complete!
Total time: 38.1480579376 seconds.
Approximate memory used: 49931008 bytes. [/b]

It seems to have finished and claims the SuiteCRM 7.1.2 is now complete… but I noticed several warning level errors… Should I be concerned?

Is this a bug?

No they are just warnings, turn them off in your php.ini

Hello Andy!

Thanks for your reply!

I realize I could set the corresponding error_reporting to hide warning level errors in the PHP.INI for the server/site, however, I run across many screens which say “undefined” and this happens after chmod’ing the “cache” folder to 777 (as a few other threads have instructed).

(As a PHP developer, I’m not a fan of hiding the symptom, more a fan of treating the cause)

As a long time PHP programmer I understand what is happening when a Foreach is getting an invalid argument supplied… and reviewing the code, I see this is within the “load_report_beans()” function and is complaining that “aor_moduleList” is not valid.

Seeing consistent “undefined” text would appear to be a seperate issue, but now reviewing this i am concerned that reporting may not be functioning correctly.

Could you shed some light on what report beans are? or maybe why the aor_moduleList is empty?

(If this is expected functionality, perhaps SuiteCRM could bundle a PHP.INI in the application’s root folder so systems configured with “Allow Override” [most hosted environments] would not be spitting warnings to less informed installers?)

What version of php are you using? Sugar is meant for 5.3.x. The newer the version of PHP you use the more of these issues you will get although it still runs generally if you turn of notices, warnings etc…

These problems you are seeing are issues that came with SugarCRM CE when we forked it. I am a long term PHP developer myself but I don’t know the cause of many of the issues you are talking about. SugarCRM CE is such a vast application and the underlying code is sloppy in places.

Have you tried doing a quick repair and rebuild then a rebuild relationships? This might solve some of your issues but generally just hide the warning and notices use the application. Only worry when you get a fatal error or something clearly is not working correctly.

Also I suggest you look in to the Sugar developer guide to under stand what beans are etc…

http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_6.7/02_Application_Framework/

1 Like