![]() |
Cannot access protected property CodeIgniter\HTTP\IncomingRequest::$uri - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Cannot access protected property CodeIgniter\HTTP\IncomingRequest::$uri (/showthread.php?tid=90608) Pages:
1
2
|
RE: Cannot access protected property CodeIgniter\HTTP\IncomingRequest::$uri - mywebmanavgat - 05-06-2024 Even if you change the function, you need to edit all your code one by one. Because in the new update, the application folder is also included in the segment. This has not been this way since ci3. Why did you really do this? In order not to edit all my code, I applied the following in BaseController. PHP Code: public function __construct() RE: Cannot access protected property CodeIgniter\HTTP\IncomingRequest::$uri - joeedman - 07-27-2024 Just replace uri to getUri. PHP Code: // $this->language->setLocale($this->session->lang); RE: Cannot access protected property CodeIgniter\HTTP\IncomingRequest::$uri - eduardofiorini - 12-29-2024 Hello everyone, just replace the old code below: PHP Code: $request = \Config\Services::request(); By direct call to the service: PHP Code: $uri = service('uri'); I had the same problem when migrating from version 4.4.3 to the current version 4.5.6 |