-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them
Description
PHP Version
8.2
CodeIgniter4 Version
4.1.3
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
apache
Database
Mongodb
What happened?
calling a webpage via cli is a pain in ci4. we faced a lot of issues when tried running a phpcode via terminal.
- i had a fatal error in my initController function of parent class.but this was not shown to me instead it stopped the execution at my __destruct function complaining different issue.it took me a lot of time to identify the real problem
- $this->request->uri is public in normal request(via browser) . but when running via a terminal it throws error Cannot access protected property CodeIgniter\HTTP\CLIRequest::$uri
Steps to Reproduce
ParentController.php.txt
Test.php.txt
(please rename the extension to .php as it wont allow me to upload this files)
run test.php
Expected Output
- run via terminal/browser getting error at __destruct . it should have stoped at initcontroller right?
- comment the line
$this->dd(); //no such function fatal error
run via terminal it should be working like running via a browser. now getting error: Cannot access protected property CodeIgniter\HTTP\CLIRequest::$uri
Anything else?
please suggest whether this was an error
Metadata
Metadata
Assignees
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them