ElkArte Community

Elk Development => Bug Reports => Topic started by: Voyager on June 08, 2023, 02:49:47 pm

Title: ERROR Administration Center Trying to access array offset on value of type bool
Post by: Voyager on June 08, 2023, 02:49:47 pm
Hi there,

- I have just installed my first ElkArte Community Software, it went smood as  :partying_face

All seems fine until I log into the Admin Center and get hit with this error message "Trying to access array offset on value of type bool" ,now, the strange part is that I can't acccess the Admin Center -or- Support & Credits without getting this error message but everything else is accessible.

Anyone got a clue about what's causing this?

Title: Re: ERROR Administration Center Trying to access array offset on value of type bool
Post by: Spuds on June 08, 2023, 05:44:59 pm
That is a :bug: thanks for all the details.

Change line 31 in Server.subs.php which currently has if (function_exists('sys_getloadavg')) to instead say if (function_exists('sys_getloadavg') && sys_getloadavg() !== false)

The problem is that function can return false, in which case trying to access it as an array throws an error.  The above should prevent that.
`