This is quite annoying, when you're trying to develop a site where all
errors are considered fatal...
I've been peeking in the code, and it seems to me that this is not
even intentional? Outline uses an OutlineDebug function for other
notices...
Or be more specific - where is the notice produced, in the generated
template or in outline itself?
In the function, OutlineCompiler::compile($tpl).
Cirka line 107.
trigger_error("...", E_USER_NOTICE), is used to notify the user that
Outline is running in UTF-8 mode. (About 20 lines below this, the
OutlineDebug function is used to notify about plugin loading... Maybe
trigger_error should be changed to OutlineDebug?)
Hope this helps! :)
Treating a notice as fatal seems kind of paranoid? Some PHP functions
(and many third-party libraries) will give you notices that can't be
suppressed. It's called a "notice" for a reason - because it's just a
notice, some guidance or useful information for the programmer, not an
error.
Note that by using the "quiet" configuration flag, you can turn off
E_NOTICE, E_WARNING and E_STRICT error reporting.
To integrate your (custom?) error-handler with PHP standard error-
handling, you should check the current error-reporting bitmask,
perform a bitwise "and" with the error-level of the error that was
logged, and only react if a reportable error was trapped. In your
application, you can set the error_reporting to E_ALL, meaning all
errors will be trapped (and fatal) within your application.
Third-party libraries (such as Outline) are usually designed to work
with the standard PHP error-handler, so in order for your error-
handler to be compatible with third-party libraries, it must be
compatible with the standard PHP error-handler. Third-party libraries
that periodically require special error-handling, such as Outline (due
to it's code generation features) usually offer features (e.g. the
"quiet" switch) to temporarily change the error-reporting bitmask.
If you blindly treat any trappable error as fatal, regardless of the
current error-reporting bitmask, you're asking for trouble. I think
we've had this debate in the past? :-)
Feel free to show me your custom error-handler here, if you'd like me
to take a look at it...
My treating notices as fatal is intentional. It forces me to get rid
of them.
I've yet to encounter a PHP function notice I couldn't get rid of.
I understand the intention of notices, but in real life I just want my
PHP to execute completely "clean" :)
I'll look into this "quiet" switch, but I sure wouldn't mind still
getting the warnings and errors... Otherwise the means defeat the
purpose :D
MAYBE I'll give in and let notices slide... Maybe... :)