#973: Harden path string handling in AgaviArrayPathDefinition
--------------------+-------------------------------------------------------
 Reporter:  david   |       Owner:  dominik
     Type:  task    |      Status:  new    
 Priority:  normal  |   Milestone:  0.11.6 
Component:  util    |     Version:  0.11.5 
 Severity:  normal  |    Keywords:         
Has_patch:  0       |  
--------------------+-------------------------------------------------------
 Right now, if path strings are malformed (such as {{{foo[[bar]}}} or
 {{{lol]cats}}}), behavior is a bit erratic.

 So, what we need to do is:
  * throw exceptions (I'd suggest {{{InvalidArgumentException}}}) if a key
 is invalid in {{{getPartsFromPath()}}}
  * allow strings in addition to arrays as first argument to
 {{{getValue()}}} etc (makes things more convenient)
  * adapt {{{Agavi*Holder}}} to catch such an exception and deal with it
 appropriately
  * look at other parts in the code (routing, {{{AgaviVirtualArrayPath}}}
 etc) if exceptions need to be caught there (I don't think so)

-- 
Ticket URL: <http://trac.agavi.bitxtender.net/ticket/973>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


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

Reply via email to