So, I've committed some beginning error handling code.
The easiest way to see it in action is to add $g_detailed_errors = ON to
your custom_config_inc.php file. This is optional but you'll see the
variable values which is useful while debugging. Then add something like:
get_var( 'foo' );
In some page and try to view it. Since you didn't give it a default and
the variable doesn't exist you get an error. This is the only place
that specifically calls the new error handler at the moment. PHP system
errors of type E_WARNING and E_NOTICE will also get handled by the error
The defaults are currently for NOTICEs to be ignored, WARNINGs to be
displayed inline in the page, and ERRORs to halt page execution and
display the error by itself. These defaults can be changed or you can
override them in custom_config_inc.php as well.
I also added error_string() which takes an error and returns the string
for it in the correct language. If we start using that instead of
accessing the global variable directly, it will make it easier if we
decide to put it in a database or something later.
Beta4 Productions (http://www.beta4.com)
Get latest updates about Open Source Projects, Conferences and News.