PHP Warning 'yii\base\ErrorException' with message 'array_key_exists() expects parameter 2 to be array, null given'
in <...>/vendor/yiisoft/yii2/rbac/DbManager.php:490
Unfortunately, I didn't find this before new framework release.
Here is an example:
<?php
namespace app\commands;
use Yii;
use yii\console\Controller;
class TestController extends Controller
{
public function actionIndex()
{
$role = Yii::$app->authManager->createRole('test');
Yii::$app->authManager->add($role);
Yii::$app->authManager->getChildRoles('test');
}
}
getChildRoles()
See also https://github.com/yiisoft/yii2-mongodb/issues/161.
Unfortunately, I didn't find this before new framework release.
Here is an example: