Hi there, 

Wasn't there an idea of adding a "cast_to" or "type" attribute anyways?
Or check for an explicit CDATA block to preserve leading white-spaces?

So, knowing what type is assumed, casting of "   " to NULL may be right when 
expecting an array, but wrong for strings.

Anyway, a default to NULL (as purposed) seems to be the best way for most cases.

Cheers, 
Robert 

On 05.01.2010, at 19:02, David Zülke wrote:

> Hi folks,
> 
> can anyone provide feedback here please?
> 
> Thanks,
> 
> David
> 
> 
> On 05.01.2010, at 18:53, Agavi wrote:
> 
>> #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       |
>> --------------------+-------------------------------------------------------
>> 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.
>> 
>> -- 
>> Ticket URL: <http://trac.agavi.org/ticket/1203>
>> Agavi <http://www.agavi.org/>
>> An MVC Framework for PHP5
>> 
>> 
>> 
>> _______________________________________________
>> Agavi Tickets Mailing List
>> [email protected]
>> http://lists.agavi.org/mailman/listinfo/tickets
> 
> 
> 
> _______________________________________________
> Agavi Dev Mailing List
> [email protected]
> http://lists.agavi.org/mailman/listinfo/dev


_______________________________________________
Agavi Dev Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/dev

Reply via email to