The error presented seems to be triggered when a URL has been manipulated to add more pages than what is intended or is available.

The errors do not break anything or share private information with any of your forum visitors. When triggered, a basic error message is displayed to the user (full error if you have debugging turned on). The full SQL error is appended to the daily SQL error log file when you have Database Error Logging enabled.


You can receive the following fixes when UBB.threads 7.7.5 is released, or you can apply them yourself now. The fixes are simple and are added below:

FIND IN /scripts/activetopics.inc.php
AROUND LINE 122
Code
	// What is our limit clause?
	if ($page == 1) {
		$limit = "limit $PostsPer";
	} else {
		$limit = "limit " . (($page - 1) * $PostsPer) . ", $PostsPer";
	}
REPLACE WITH:
Code
	// What is our limit clause?
	if ($page == 1) {
		$limit = "LIMIT $PostsPer";
	} else {
		$Startat = ($page - 1) * $PostsPer;
		if (!is_int($Startat)) $Startat = 0;
		$limit = "LIMIT $Startat, $PostsPer";
	}


FIND IN /scripts/postlist.inc.php
AROUND LINE 461
Code
	// the previous and nexts posts will be
	if ($page == 1) {
		$Totalgrab = $PostsPer;
		$Posts = $PostsPer + 1;
	} else {
		$Startat = ($page - 1) * $PostsPer;
		$Posts = $PostsPer + 1;
		if (!is_numeric($Startat)) $Startat = 0;
		$Totalgrab = "$Startat, $Posts";
	}
REPLACE WITH:
Code
	// the previous and nexts posts will be
	if ($page == 1) {
		$Totalgrab = $PostsPer;
		$Posts = $PostsPer + 1;
	} else {
		$Startat = ($page - 1) * $PostsPer;
		$Posts = $PostsPer + 1;
		if (!is_int($Startat)) $Startat = 0;
		$Totalgrab = "$Startat, $Posts";
	}


FIND IN /scripts/showmembers.inc.php
AROUND LINE 141
Code
	// Here we grab the users for this page
	if ($page == 1) {
		$Totalgrab = $per_page;
	} else {
		$Startat = (($page - 1) * $per_page);
		if ($Startat < 0) $Startat = 0;
		$Totalgrab = "$Startat, $per_page";
	}
REPLACE WITH:
Code
	// Here we grab the users for this page
	if ($page == 1) {
		$Totalgrab = $per_page;
	} else {
		$Startat = ($page - 1) * $per_page;
		if (!is_int($Startat)) $Startat = 0;
		$Totalgrab = "$Startat, $per_page";
	}