HR
Asked
Dear friends, I receive the following error in the logs when opening the expense report, could you tell me how to solve it.
ERROR - 2020-12-29 18:27:10 --> Severity: Warning --> Invalid argument supplied for foreach() C:\server\www\sma\themes\default\admin\views\reports\expenses.php 160
160 -- foreach ($categories as $category) {
161 -- $ct[$category->id] = $category->name;
162 -- }
Kind regards.
ERROR - 2020-12-29 18:27:10 --> Severity: Warning --> Invalid argument supplied for foreach() C:\server\www\sma\themes\default\admin\views\reports\expenses.php 160
160 -- foreach ($categories as $category) {
161 -- $ct[$category->id] = $category->name;
162 -- }
Kind regards.
- MSAnsweredHello,
As I replied to your previous questions.
Hello,
Please set the `ENVIRONMENT` to `production` in index.php as system don't check for the empty array.
**_Please add expense category and this error will be gone._**
Thank you - HRAnsweredSorry, but the 'ENVIRONMENT' setting is in 'production'
define ('ENVIRONMENT', 'production');
Kind regards. - MSAnsweredDid you add the expense category? Once you have a expense category the error will be gone. Thank you
- Login to Reply