Ticket #470 (closed defect: invalid)

Opened 21 months ago

Last modified 21 months ago

AgaviWebRouting - array_reverse bug

Reported by: RossC0 Owned by: david
Priority: normal Milestone: 0.11
Component: routing Version: 0.11.0RC4
Severity: normal Keywords:
Cc: Patch attached:

Description

I'm logging all actions etc and in my logger I store the route i.e. $ro->gen(null);

This has lead to a couple of bugs creeping in which have been hard to replicate caused by:

$routes = array_reverse($req->getAttribute('matched_routes', 'org.agavi.routing'));

If the matched_routes aren't stored then getAttribute returns null! and cannot be reversed!

Patch incoming!

Attachments

AgaviWebRouting.patch (1.1 KB) - added by RossC0 21 months ago.

Change History

Changed 21 months ago by RossC0

Changed 21 months ago by david

  • status changed from new to assigned
  • component changed from _OTHER_ to routing

Changed 21 months ago by RossC0

Ok - was trying to generate a route on BaseAction?->startup();

I was logging any automatic logins and have moved the route->gen to the shutdown - I don't need to query it for every log...

Changed 21 months ago by david

  • status changed from assigned to closed
  • resolution set to invalid

Yep routing hasn't been execute()d by the time User::startup() runs... :) A filter could do the job, or an overridden Routing::execute(). Closing this as invalid.

Add/Change #470 (AgaviWebRouting - array_reverse bug)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.