SMF 2.0.15 + PHP 7.1 - [] operator not supported for strings

Started by PhilGer, October 27, 2018, 05:00:20 PM

Previous topic - Next topic

PhilGer

Quote from: Arantor on October 28, 2018, 03:44:23 PM
Hmm, so that implies that it uses integration hooks to do its thing rather than file edits - I don't remember if anyone built a tool to clear out the integration hooks or not, off hand.

Failing that, if you wanted to attach that file here I can fix it for you.
I fixed it already. I changed Sources\Subs-SimTopics.php, line 69 from:
$context['similar_topics'] = '';
to:
$context['similar_topics'] = array();
The error seems to be gone!

Thank you very much! Fixing this was easy, but your help localizing the source of the problem is invaluable!

My bedtime reading today will be about Integration Hooks.

Arantor

That would certainly do it and is the kind of thing that PHP 7.1 makes devs fix now, glad you got it sorted :)

Illori

Quote from: Arantor on October 28, 2018, 03:44:23 PM
Hmm, so that implies that it uses integration hooks to do its thing rather than file edits - I don't remember if anyone built a tool to clear out the integration hooks or not, off hand.

both repair_settings.php and fix_packages.php can clear out all hooks.

vbgamer45

If Subs-SimTopics.php is from a mod contact the mod author to update it as well.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

PhilGer

Sorry for the late reply. I had no time for admin tasks during the week.
Quote from: vbgamer45 on October 28, 2018, 04:40:21 PM
If Subs-SimTopics.php is from a mod contact the mod author to update it as well.
I installed the most recent version (0.8.1) of Similar Topics today and the problem is fixed there already.

The whole hassle with the error message was only because the old version (0.6) of Similar Topics, containing the error, appeared to be uninstalled but was still active anyway.

Thanks to everybody who participated in this thread!

Advertisement: