diff --git a/system/Pager/Pager.php b/system/Pager/Pager.php index 3ec23ce07b83..05f2857b96f9 100644 --- a/system/Pager/Pager.php +++ b/system/Pager/Pager.php @@ -503,7 +503,7 @@ protected function ensureGroup(string $group) } $this->groups[$group] = [ - 'uri' => clone Services::request()->uri, + 'uri' => clone current_url(true), 'hasMore' => false, 'total' => null, 'perPage' => $this->config->perPage, @@ -520,7 +520,7 @@ protected function ensureGroup(string $group) } //-------------------------------------------------------------------- - + /** * Calculating the current page * @@ -545,7 +545,7 @@ protected function calculateCurrentPage(string $group) $page = (int) ($_GET[$pageSelector] ?? 1); - $this->groups[$group]['currentPage'] = $page < 1 ? 1 : $page; + $this->groups[$group]['currentPage'] = $page < 1 ? 1 : $page; } } diff --git a/tests/system/HTTP/RedirectResponseTest.php b/tests/system/HTTP/RedirectResponseTest.php index fb1599fe88ea..46c29a2052c1 100644 --- a/tests/system/HTTP/RedirectResponseTest.php +++ b/tests/system/HTTP/RedirectResponseTest.php @@ -188,6 +188,9 @@ public function testRedirectBackMissing() } /** + * @runInSeparateProcess + * @preserveGlobalState disabled + * * @see https://github.com/codeigniter4/CodeIgniter4/issues/2119 */ public function testRedirectRouteBaseUrl() diff --git a/tests/system/HTTP/ResponseTest.php b/tests/system/HTTP/ResponseTest.php index f46ddf7296ed..702c9a4b299c 100644 --- a/tests/system/HTTP/ResponseTest.php +++ b/tests/system/HTTP/ResponseTest.php @@ -12,6 +12,8 @@ class ResponseTest extends \CIUnitTestCase { + protected $server; + protected function setUp(): void { parent::setUp();