Browse Source

Fixes #1248: url manager didn't handle array parameters well.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
7b0ba10d31
  1. 2
      framework/yii/web/UrlRule.php

2
framework/yii/web/UrlRule.php

@ -288,7 +288,7 @@ class UrlRule extends Object
// match params in the pattern
foreach ($this->_paramRules as $name => $rule) {
if (isset($params[$name]) && ($rule === '' || preg_match($rule, $params[$name]))) {
if (isset($params[$name]) && !is_array($params[$name]) && ($rule === '' || preg_match($rule, $params[$name]))) {
$tr["<$name>"] = urlencode($params[$name]);
unset($params[$name]);
} elseif (!isset($this->defaults[$name]) || isset($params[$name])) {

Loading…
Cancel
Save