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
CI_Exceptions::show_error wrong behaviour #4036
Comments
Just to clarify - I do consider this to be a bug, but I wouldn't at all be surprised if somebody actually depends on the current behavior, so I'm thinking of fixing it in version 3.1 (pending some internal discussion). |
If it's going to block the entire response when failing to load a view, then I think this should have a backtrace to show which view is requesting the non-existent view. |
Well, that's if this is only relevant to views loading other views, but that's unclear right now. |
I do not agree that this is a bug. If there were a PHP error, I would expect to see the PHP error message(s), and then the contents of the view, including any CI error messages. |
It is contentious, indeed. If we consider an error displayed after e.g. a hundred lines of output, it could be hard to spot or even completely hidden via styling. On the other hand, not discarding previous output helps in (visually) spotting where the error has occurred. |
I found a strange behaviour with the show_error method.
Test code looks like this:
Controller:
View (exists.php):
The call to
$this->load->view('does_not_exists');
triggers an error because the view does not exist.The generated output looks like this: http://abload.de/img/testzrswq.jpg
I would expect only the error message to be displayed, like if the controller would use
$this->load->view('does not exists');
.I found this because my view looked like this:
which suppresses the error message.
The text was updated successfully, but these errors were encountered: