about Yii checkAccess's bug

I code a test about RBAC of Yii 1.1.6 and find a bug:

my test function:

    public function testUserAccessBasedOnProject(){

        $row = $this->projUserRole['row1']; /2/2/owner

        Yii::app()->user->setId($row['user_id']); //2

        $project = Project::model()->findByPk($row['project_id']); //#2


        $auth = Yii::app()->authManager;

        $bizRule = 'return isset($params["theProject"]) && $params["theProject"]->isUserInRole("owner")';

        $role = $auth->assign('owner', $row['user_id'], $bizRule);

        $params = array('theProject' => $project);

        $this->assertTrue(Yii::app()->authManager->checkAccess('createProject', $params));


I found a strange problem when code execute checkAccess function:

mysql log is blow:

		   36 Query	INSERT INTO AuthAssignment (itemname,userid,bizrule,data) VALUES ('owner',2,'return isset($params[\"theProject\"]) && $params[\"theProject\"]->isUserInRole(\"owner\")','N;')

		   36 Query	[font="Arial Black"]SELECT * FROM AuthAssignment WHERE userid='Array'[/font]

		   36 Query	SELECT * FROM AuthItem WHERE name='createProject'

		   36 Query	SELECT parent FROM AuthItemChild WHERE child='createProject'

the query :

SELECT * FROM AuthAssignment WHERE userid=‘Array’

why the userid is a array, rather than a integer?

I pass a integer >:( !

it’s my mistake.

Yii::app()->authManager->checkAccess() has three params.

itemName, user_id, bizRules


Yii::app()->user->checkAccess() has two params.

itemName, bizRules