MyBB Community Forums

Full Version: MyReaction plugin is bugged ... but I fixed.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I noticed that , the error file reports something like this when a user is going to post a post, and mybb is unable to show the post instantly, the post appears, but the page has to be reloaded in order it to appear. I solved this by adding is_array($thread_reactions) in inc\plugins\myreactions.php at 402 line, so it fixed the problem. as I noticed this only happens when errors are hidden in "Home » Board Settings » Server and Optimization Options" , otherwise it works fine. 

Quote:<error>
<dateline>1486637938</dateline>
<script>inc/plugins/myreactions.php</script>
<line>402</line>
<type>2</type>
<friendly_type>Warning</friendly_type>
<message>array_key_exists() expects parameter 2 to be array, null given</message>
</error>

the solution is simple, just replace the existing line at 402 (line) (use notepad++) in  inc\plugins\myreactions.php with this
if(is_array($thread_reactions) && array_key_exists($post['pid'], $thread_reactions))