I’ve been extremely confused about urlManager::createUrl()!!! I want to use it to build an url like this one:
$url = 'http:://localhost/myapp/mycontroller/myaction/?related[key1]=1&related[key2]=2';
That means support params as multidim array. If your try to call for example:
$array_of_keys = array(
'key1' => 1,
'key2' => 2
);
$url = Yii::app()->createUrl('mycontroller/myaction', array('id' => $array_of_keys));
These will generate a PHP Warning: urlencode() expects parameter 1 to be string, array given. After googlin around I found a Yii issue http://code.google.com/p/yii/issues/detail?id=737 (and related git issues). It report just the same bug I’m exposing here but It also says that it’s closed (resolved if you look in the changelog) but that’s not true!!!
PS: this situation has been created because I NEED to handle composite primary key in the url together with other params. Since the "multidim support" should be already there I would like to use this functionality to handle composites pks.