#1307: Make AgaviFormPopulationFilter parsing more lenient
--------------------+-------------------------------------------------------
Reporter: david | Owner: david
Type: task | Status: assigned
Priority: normal | Milestone: 1.0.5
Component: filter | Version: 1.0.3
Severity: normal | Keywords:
Has_patch: 0 |
--------------------+-------------------------------------------------------
Comment(by david):
Solution: the {{{ignore_parse_errors}}} parameter now takes four possible
values defining the maximum level of errors to ignore:
- {{{LIBXML_ERR_NONE}}} (throw an exception for any error, equivalent to
the old default boolean {{{false}}})
- {{{LIBXML_ERR_WARNING}}} (quite useless, as DOM rarely ever produces
warnings)
- {{{LIBXML_ERR_ERROR}}} (the new default, suppressing all recoverable
errors)
- {{{LIBXML_ERR_FATAL}}} (recommended for production, equivalent to the
old boolean {{{true}}})
If an error is recoverable (i.e. level smaller than
{{{LIBXML_ERR_FATAL}}}) and {{{ignore_parse_errors}}} is configured
appropriately, FPF will continue operation instead of throwing an
exception.
If an error is not recoverable (i.e. level {{{LIBXML_ERR_FATAL}}}) and
{{{ignore_parse_errors}}} is set to {{{LIBXML_ERR_FATAL}}}, FPF will
silently abort.
In all other cases, an exception will be thrown.
The new default ({{{LIBXML_ERR_ERROR}}}) means that in XML parsing mode,
"undefined entity" errors will no longer occur, and in HTML parsing mode,
well-formedness errors and unknown tags (such as new HTML5 elements) will
also be suppressed.
All errors will be logged with different severities, the mapping depends
on the highest error level encountered:
- {{{LIBXML_ERR_WARNING}}} to {{{AgaviILogger::WARN}}}
- {{{LIBXML_ERR_ERROR}}} to {{{AgaviILogger::ERROR}}}
- {{{LIBXML_ERR_FATAL}}} to {{{AgaviILogger::FATAL}}}
As a consequence, the configuration parameter {{{logging_severity}}} has
been removed.
--
Ticket URL: <http://trac.agavi.org/ticket/1307#comment:4>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets