#1 August 10, 2020 11:27am

kdubious
Member
Registered: August 3, 2020
Posts: 5

Warning: Invalid argument supplied for foreach() /admin.php on line 41

Getting this warning:
Warning: Invalid argument supplied for foreach() in /home/bliss/public_html/core/inc/bigtree/admin.php on line 4133

Do you guys all typically hide warnings? or should this be fixed?

Offline

#2 August 10, 2020 4:50pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 970

Re: Warning: Invalid argument supplied for foreach() /admin.php on line 41

What version of BigTree are you currently on? You shouldn't get any visible errors with the default E_ERROR | E_WARNING level. There are definitely abundant notices in the admin in BigTree 4 but we're looking to rectify that in BigTree 5.

Offline

#3 August 11, 2020 9:18am

kdubious
Member
Registered: August 3, 2020
Posts: 5

Re: Warning: Invalid argument supplied for foreach() /admin.php on line 41

We're on 4.4.5

Where is the E_ERROR | E_WARNING setting set? I've inherited this project from another developer, and I don't see anything useful if I search for E_ERROR in the code.

ACTUALLY: Found this, which turns it off:
    $bigtree["config"]["debug"] = false;

Last edited by kdubious (August 11, 2020 9:28am)

Offline

#4 August 11, 2020 4:56pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 970

Re: Warning: Invalid argument supplied for foreach() /admin.php on line 41

I'd recommend upgrading to 4.4.10 — if the error persists let me know what line number it comes from in 4.4.10 and I'll see if we can fix the bug!

Debug off is definitely the right solution for turning off front end errors in production but it's not ideal in development as you might miss bugs with it off.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.