[Duplicate] Division by zero in managegroup.php
#1
$per_page is not defined in managegroup.php (line 358) and throws a Division by zero warning:
	$perpage = (int)$mybb->settings['membersperpage'];
	if($perpage < 1)
	{
		$perpage = 20;
	}

	$page = $mybb->get_input('page', MyBB::INPUT_INT);
	if($page && $page > 0)
	{
		$start = ($page-1) * $perpage;
		$pages = ceil($numusers / $per_page);
		if($page > $pages)
		{
			$start = 0;
			$page = 1;
		}
	}
	else
	{
		$start = 0;
		$page = 1;
	}
[Image: banner.png]
Reply
#2
I can see $perpage is defined in your posted code and reset to hardcoded default in case of less than 1.
More reproduction steps needed...
Reply
#3
I'm talking about $per_page.
[Image: banner.png]
Reply
#4
This appears to be fixed in the feature branch, and should be fixed in 1.8.20: https://github.com/mybb/mybb/blob/featur...p.php#L358
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)