Development

Changeset 6614

You must first sign up to be able to contribute.

Changeset 6614

Show
Ignore:
Timestamp:
12/20/07 15:51:15 (10 months ago)
Author:
noel
Message:

fixed magic_quotes_gpc() handling in sfRouting (closes #1801)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/controller/sfRouting.class.php

    r6125 r6614  
    581581              $found .= $pass[$i].'='.$pass[$i + 1].'&'; 
    582582            } 
     583 
    583584            parse_str($found, $pass); 
     585 
     586            if (get_magic_quotes_gpc()) 
     587            { 
     588              $pass = sfToolkit::stripslashesDeep((array) $pass); 
     589            } 
     590             
    584591            foreach ($pass as $key => $value) 
    585592            { 
  • branches/1.0/test/unit/controller/sfRoutingTest.php

    r6125 r6614  
    207207$t->is($r->generate('', $params), $url, '->generate() takes the first matching route but takes * into accounts'); 
    208208 
     209$t->is($r->parse('/default/index/foo/bar\'123'), array('module' => 'default', 'action' => 'index', 'foo' => 'bar\'123'), '->parse() handles quotes'); 
     210 
     211 
    209212// * in the middle 
    210213$r->clearRoutes();