mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merging changes from [5157] into DboSource.
Adding better check in Router::stripEscape() git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5160 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
eaff06bff6
commit
f706d050a4
1 changed files with 3 additions and 3 deletions
|
@ -737,15 +737,15 @@ class Router extends Object {
|
|||
}
|
||||
function stripEscape($param) {
|
||||
if(is_string($param) || empty($param)) {
|
||||
$return = preg_replace('/^ *-!/', '', $param);
|
||||
$return = preg_replace('/^[\\t ]*(?:-!)+/', '', $param);
|
||||
return $return;
|
||||
}
|
||||
foreach($param as $key => $value) {
|
||||
if(is_string($value)) {
|
||||
$return[$key] = preg_replace('/^ *-!/', '', $value);
|
||||
$return[$key] = preg_replace('/^[\\t ]*(?:-!)+/', '', $value);
|
||||
} else {
|
||||
foreach ($value as $array => $string) {
|
||||
$return[$key][$array] = preg_replace('/^ *-!/', '', $string);
|
||||
$return[$key][$array] = preg_replace('/^[\\t ]*(?:-!)+/', '', $string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue