MyBB Community Forums

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

My version of editpost.php is modified by Laird's OPCanCloseThread plugin, so line 409 here is line 397 in the original file.

<error>
	<dateline>1695155378</dateline>
	<datetime>2023-09-19 20:29:38 UTC -0500</datetime>
	<script>editpost.php</script>
	<line>409</line>
	<type>2</type>
	<friendly_type>Warning</friendly_type>
	<message>Undefined array key "ajax"</message>
	<back_trace>#0  errorHandler->error() called at [/inc/class_error.php:153]
#1  errorHandler->error_callback() called at [/editpost.php:409]
</back_trace>
</error>

Find line 397 (in original file)
				if($mybb->input['ajax'] == 1)
and replace it with
				if($mybb->get_input('ajax', MyBB::INPUT_INT) == 1)

The same line appears in source code at lines 342, 457, and 483. You may want to make the same fix there.