MyBB Community Forums

Full Version: ratethread.php warning 1.8.36
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ratethread.php
A warning is generated.

<error>
	<dateline>1695210774</dateline>
	<datetime>2023-09-20 11:52:54 UTC -0500</datetime>
	<script>ratethread.php</script>
	<line>96</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>Trying to access array offset on value of type null</message>
	<back_trace>#0  errorHandler->error() called at [/inc/class_error.php:153]
#1  errorHandler->error_callback() called at [/ratethread.php:96]
</back_trace>
</error>

Find line 96
if($ratecheck['rid'] || isset($mybb->cookies['mybbratethread'][$tid]))
and replace with
if(!empty($ratecheck['rid']) || isset($mybb->cookies['mybbratethread'][$tid]))
That's fixed in one of my pull requests: https://github.com/mybb/mybb/pull/4739/f...1ec63171b4
How do I find a pull request with a commit? The suggestion is to search issues, but it does not seem like there is an easy way to sift through. Like, is there a key word search?

Don't mind posting what I find, not sure if it's necessary if there is a fix in the works.
Better to report twice than let one slip through

good job, HLFadmin
We need to wait for MyBB team to accept PRs... there are many fixes related to PHP 8.0 and higher...