* [misc] Introduce a new variable instead of reusing the parameter .

This commit is contained in:
zhangxiquan
2025-01-06 16:14:10 +08:00
committed by 翟晓剑
parent 01e6895229
commit 021e4f8ff3
+3 -3
View File
@@ -41,10 +41,10 @@ class space extends control
/* Pager. */
$this->app->loadClass('pager', true);
$recTotal = count($allInstances);
if($recPerPage * ($pageID - 1) > $recTotal) $pageID = 1;
$newRecTotal = count($allInstances);
if($recPerPage * ($pageID - 1) > $newRecTotal) $pageID = 1;
$pager = new pager($recTotal, $recPerPage, $pageID);
$pager = new pager($newRecTotal, $recPerPage, $pageID);
$allInstances = array_chunk($allInstances, $pager->recPerPage);
$solutionID = 0;