Welcome Guest, Not a member yet? Register   Sign In
What is the expected output of ini_set('display_errors', 0)?
#5

(09-08-2020, 10:40 PM)John_Betong Wrote: Please note that ini_set(...) second parameter should be a string type 

Adding <?php declare('strict_types=1); at the start of the page will throw an error.

Check the PHP Online Manual:

https://www.php.net/manual/en/function.ini-set.php

Thanks, John. Note that this code comes by default from CI 3. I did not change it in any way. You're absolutely right that ini_set should have a string parameter, yet it does not seem to change the situation. Allow me to explain by means of example error output:

[Image: PvsYILE.png]
The above is example output when intentionally triggering an error (loading a Model that does not exist) in 'development' mode. This corresponds to ini_set('display_errors', 1); as per standard CI3 logic.

This works fine. In development mode, we want to see these kind of technical error details. 

In production, we want to disable such output, so we do...

ini_set('display_errors', '0');

Keeping our intentional error in place (missing model) this is what the user will see:

[Image: KZbWSCe.png]

This is what my question is about. I understand not wanting to show technical error details to a user in production mode, but this shouldn't mean a user gets to see something like above, right?
Reply


Messages In This Thread
RE: What is the expected output of ini_set('display_errors', 0)? - by ferdy - 09-09-2020, 03:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB