-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined property: Config\App::$errorViewPath #765
Comments
@anrip Is this using the very latest code? |
@lonnieezell Yes, i am getting this error too,after merging with latest code. |
latest commit in my fork is 6eedefb (a day ago) |
yes, last code |
Can you show us the code of the Application/Config/Exceptions.php file? |
|
the issue is codeigniter.php uses the config property "$this->config->errorViewPath " from \Config\App. |
Yup, only happens with 404Overides in place, by the looks of it. Will look at it closer tonight, hopefully, but looks like we should be throwing a PageNotFoundException there and letting the exceptions class handle it. |
@chistel Your are right. I tested with a fresh install and get the same error. when I created public $errorViewPath = APPPATH.'Views/errors' in Config\app then it works. codeigniter.php is trying to access errorviewpath property on instance of \config\app but the property does not exists. what do you mean by "a possible merging of property from \Config\App and \Config\Exception or returm that property to it previous place. or call the exception config seperately where required." ? both property $config and $viewpath of \CodeIgniter\Debug\Exceptions is protected so cant be used in codeigniter.php i think 490a31c has something to do with this problem |
Displayed at 12:12:06pm — PHP: 7.1.9 — CodeIgniter: 4.0-dev
ErrorException
Undefined property: Config\App::$errorViewPath search →
BASEPATH/CodeIgniter.php at line 805
798 // Show the 404 error page
799 if (is_cli())
800 {
801 require $this->config->errorViewPath . '/cli/error_404.php';
802 }
803 else
804 {
805 require $this->config->errorViewPath . '/html/error_404.php';
806 }
807
808 $buffer = ob_get_contents();
809 ob_end_clean();
810
811 $this->response->setBody($buffer);
812 $this->response->send();
The text was updated successfully, but these errors were encountered: