From 08b06374740ef93b9dbb361add9ed41dc0d3c88f Mon Sep 17 00:00:00 2001 From: kaivanriz Date: Tue, 20 Aug 2024 14:28:40 +0700 Subject: [PATCH] Update HeimdallRequest.php for Codeigniter 4.5 Cannot access protected property CodeIgniter\HTTP\IncomingRequest::$uri since CI 4.5 --- src/Http/HeimdallRequest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Http/HeimdallRequest.php b/src/Http/HeimdallRequest.php index 55217ee..671b3d0 100644 --- a/src/Http/HeimdallRequest.php +++ b/src/Http/HeimdallRequest.php @@ -16,7 +16,7 @@ function __construct(IncomingRequest $request) { $username = null; $password = null; - $uri = $request->uri->showPassword(true); + $uri = $request->getUri()->showPassword(true); if (strpos($uri->getUserInfo(), ':')) { $userInfo = explode(':', $uri->getUserInfo()); $username = $userInfo[0]; @@ -33,12 +33,12 @@ function __construct(IncomingRequest $request) parent::__construct( $request->getMethod(), new Uri( - $request->uri->getScheme(), - $request->uri->getHost(), - $request->uri->getPort(), - $request->uri->getPath(), - $request->uri->getQuery(), - $request->uri->getFragment(), + $request->getUri()->getScheme(), + $request->getUri()->getHost(), + $request->getUri()->getPort(), + $request->getUri()->getPath(), + $request->getUri()->getQuery(), + $request->getUri()->getFragment(), $username, $password ), @@ -49,4 +49,4 @@ function __construct(IncomingRequest $request) $request->getFiles() ); } -} \ No newline at end of file +}