On May 25, 7:10 am, alan <[EMAIL PROTECTED]> wrote:
> https://trac.cakephp.org/ticket/2640#preview
>
> The new method in router.php is: stripEscape($param) The way it's
> currently written, it can run into problems with highly nested
> arrays.... basically it assumes that there's a text value instead of
> an array value.
>
> This is very easily fixed by making the method self-recurse. I have
> updated my router.php to do exactly that, and it seems to be working
> fine.
>
> == code ==
> <?php
>         function stripEscape($param) {
>                 if(is_string($param) || empty($param)) {
>                         $return = preg_replace('/^ *-!/', '', $param);
>                         return $return;
>                 }
>                 foreach($param as $key => $value) {
>                         if(is_string($value)) {
>                                 $return[$key] = preg_replace('/^ *-!/', '', 
> $value);
>                         } else {
>                                 foreach ($value as $array => $string) {
>                                         $return[$key][$array] = 
> $this->stripEscape($string);
>                                 }
>                         }
>                 }
>                 return $return;
>         }
> ?>

Please don't report bugs on the group - they don't get read/actioned.
the ticket mechanism on https://trac.cakephp.org is there for a
purpose.

Cheers,

AD


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to