News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Marking a board as read results in "operator not supported for strings"

Started by Darkness7148, June 05, 2017, 12:25:03 PM

Previous topic - Next topic

Darkness7148

Just upgraded to PHP 7.1 and running SMF 2.0.14. There appears to be this error when you try to mark a board as read:

[] operator not supported for strings

It doesn't appear to happen every time though..

Shambles

Is that the only line in the error report? Don't you get a file & line number?


Dav999

Can confirm this, it happens to me as well when I try to mark my recycle bin as read (on PHP 7.1, this does not happen on PHP 7.0 or below).

Nothing in the forum error log or the server error log for me either.


(this is not a hijack, please do not split ;))

vbgamer45

Confirmed
Sources\Subs-Boards.php         

$logBoardInserts = '';
while ($row = $smcFunc['db_fetch_assoc']($result))
$logBoardInserts[] = array($modSettings['maxMsgID'], $user_info['id'], $row['id_board']);



Find change to

$logBoardInserts = array();
while ($row = $smcFunc['db_fetch_assoc']($result))
$logBoardInserts[] = array($modSettings['maxMsgID'], $user_info['id'], $row['id_board']);

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

SleePy

vbgamer45,

It looks like this bug is in 2.1 as well.  Do you want to submit a PR for it as well?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vbgamer45

Can you do it. Takes me too long with github...I can never keep my copy up to date with the changes.
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

Advertisement: