Question: Error Opening The Admin Expense Report

Error Opening The Admin Expense Report

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 arg

HR

Hector Rojas

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.
  • MS

    Mian Saleem

    Answered
    Hello,

    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
  • HR

    Hector Rojas

    Answered
    Sorry, but the 'ENVIRONMENT' setting is in 'production'

    define ('ENVIRONMENT', 'production');

    Kind regards.
  • MS

    Mian Saleem

    Answered
    Did you add the expense category? Once you have a expense category the error will be gone. Thank you
  • Login to Reply