MyBB Community Forums

Full Version: I got warning on typing one command.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i got warning on typing one command given in this forum.

http://forumurl.com/search.php?action=results&sid[0]=9afaea732cb32f06fa34b1888bd237e2&sortby=&order=




 i get following warning.



[attachment=33731]



can it create any problem?
if yes, what to do next for that?
thank you.

This is a known bug in the 1.6 series. It is fixed in the 1.8 series. To fix it you can find where it says $mybb->input['sid'] and change that to be (string) $mybb->input['sid']. It won't actually cause damage.
thank you.
in which file? i have to add this change?

in function.php above code is not present.
It's in search.php.
there is code
 if($mybb->input['action'] == "results")
{
	$sid = $db->escape_string($mybb->input['sid']);

what to do next as already string word is there.

and other space this code is present.
 }
		if(!$results)
		{
			error($lang->error_nosearchresults);
		}
		$multipage = multipage($postcount, $perpage, $page, "search.php?action=results&sid=".htmlspecialchars_uni($mybb->input['sid'])."&sortby=$sortby&order=$order&uid=".$mybb->input['uid']);
Change
$sid = $db->escape_string($mybb->input['sid']);

To
$sid = $db->escape_string((string) $mybb->input['sid']);

And
$multipage = multipage($postcount, $perpage, $page, "search.php?action=results&sid=".htmlspecialchars_uni($mybb->input['sid'])."&sortby=$sortby&order=$order&uid=".$mybb->input['uid']);

To
$multipage = multipage($postcount, $perpage, $page, "search.php?action=results&sid=".htmlspecialchars_uni((string) $mybb->input['sid'])."&sortby=$sortby&order=$order&uid=".$mybb->input['uid']);
thank you.
its working !!!