From 021e4f8ff36b1673f428c182e719628f13619b94 Mon Sep 17 00:00:00 2001 From: zhangxiquan Date: Mon, 6 Jan 2025 05:59:26 +0000 Subject: [PATCH] * [misc] Introduce a new variable instead of reusing the parameter . --- module/space/control.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/space/control.php b/module/space/control.php index 52a3042a4b..779c5f2d73 100644 --- a/module/space/control.php +++ b/module/space/control.php @@ -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;