#1203: Configuration parameter whitespace handling is inconsistent
--------------------+-------------------------------------------------------
Reporter: david | Owner: david
Type: defect | Status: new
Priority: normal | Milestone: 1.0.2
Component: util | Version: 1.0.1
Severity: normal | Keywords:
Has_patch: 0 |
--------------------+-------------------------------------------------------
Description changed by david:
Old description:
> Configuration will convert this:
> {{{
> #!xml
> <ae:parameter name="foo"></ae:parameter>
> }}}
> to
> {{{
> NULL
> }}}
> while it converts
> {{{
> #!xml
> <ae:parameter name="foo"> </ae:parameter>
> }}}
> to
> {{{
> string(0) ""
> }}}
>
> This is, in my opinion, confusing and should be fixed. It leads to
> genuinely problematic bugs like #1200. Retaining the space characters
> would still be remotely logical (albeit inconsistent with the behavior of
> converting an empty string to {{{NULL}}}), but stripping them and leaving
> the empty string is just wrong.
>
> I propose to fix {{{AgaviToolkit::literalize()}}} accordingly, as the
> problem is rooted in that method.
New description:
Configuration will convert this:
{{{
#!xml
<ae:parameter name="foo"></ae:parameter>
}}}
to
{{{
NULL
}}}
while it converts
{{{
#!xml
<ae:parameter name="foo"> </ae:parameter>
}}}
to
{{{
string(0) ""
}}}
while I expect it to convert this, too, to
{{{
NULL
}}}
This is, in my opinion, confusing and should be fixed. It leads to
genuinely problematic bugs like #1200. Retaining the space characters
would still be remotely logical (albeit inconsistent with the behavior of
converting an empty string to {{{NULL}}}), but stripping them and leaving
the empty string is just wrong.
I propose to fix {{{AgaviToolkit::literalize()}}} accordingly, as the
problem is rooted in that method.
--
--
Ticket URL: <http://trac.agavi.org/ticket/1203#comment:1>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets