yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.24k stars 6.91k forks source link

PHP Warning in \yii\rbac\DbManager #7266

Closed SerjRamone closed 9 years ago

SerjRamone commented 9 years ago

Bug in \yii\rbac\DbManager

https://github.com/yiisoft/yii2/blob/d188dd10c0f9283e8e0d858cc30b2b10f52df87e/framework/rbac/DbManager.php#L888

PHP Warning – yii\base\ErrorException

unserialize() expects parameter 1 to be string, array given

auth config is

//***
'cache' => [
    'class' => 'yii\redis\Cache',
],
//***
'authManager' => [
    'class' => 'yii\rbac\DbManager',
    'cache' => 'cache',
    'defaultRoles' => [
        'admin',
        'author',
    ],
],
samdark commented 9 years ago

@qiangxue https://github.com/yiisoft/yii2/commit/d188dd10c0f9283e8e0d858cc30b2b10f52df87e

qiangxue commented 9 years ago

Thanks for reporting!