Error message in Who's Online list - latest SMF 2.1 Github builds

Started by Hatshepsut, April 08, 2020, 02:47:01 AM

Previous topic - Next topic

Hatshepsut

Hello,
I'm using SMF 2.1 RC2+
In latest Github builds (March-April 2020), when I view Who's Online list (and set list to 'Everyone'), sometimes I get an error message at the top:

Notice
: Array to string conversion in
/home/bulataka/public_html/BNF/Sources/Who.php
on line
454


Click =>

It's difficult for me to find the reason why this error occurs, but I think that it happens when some users or guests browse the calendar.

Forum details:

Forum version: SMF 2.1 RC2 (more detailed)
Current SMF version: SMF 2.1 RC2
GD version: bundled (2.1.0 compatible)
MySQL engine: MariaDB
MySQL version: 10.3.22-MariaDB-log
PHP: 7.3.16 (more detailed)
Server version: Apache

Bobby

Sometimes i get these errors, too. I think an user action isnot defined by text in who language file. Example: i've installed a sitemap mod and it has
action=sitemap but in the language file doesn't have $txt['whoallow_sitemap'] = 'Viewing the site map';

The solution to this issue just ignore it, or try this:
Open Sources/Who.php
Find (line 454): $data[$k] .= ' <span class="main_icons error" title="' . $error_message . '"></span>';
Replace with: @$data[$k] .= ' <span class="main_icons error" title="' . $error_message . '"></span>';

Arantor

That'll just end up making it have a tooltip that says "Array", which isn't the problem.

Hatshepsut

Quote from: Bobby on April 24, 2020, 11:43:50 PM
Sometimes i get these errors, too. I think an user action isnot defined by text in who language file. Example: i've installed a sitemap mod and it has
action=sitemap but in the language file doesn't have $txt['whoallow_sitemap'] = 'Viewing the site map';

The solution to this issue just ignore it, or try this:
Open Sources/Who.php
Find (line 454): $data[$k] .= ' <span class="main_icons error" title="' . $error_message . '"></span>';
Replace with: @$data[$k] .= ' <span class="main_icons error" title="' . $error_message . '"></span>';

Thanks for the fix, it works fine :)

Advertisement: