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;
        }
?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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