尝试宣传用户时出错:
php bin/console fos:user:promote admin ROLE_ADMIN
[Symfony的\元器件\调试\异常\ ContextErrorException] 警告:in_array()期望参数2为数组,给定
为null
我该如何调试?谢谢,
异常追踪:
() at \vendor\friendsofsymfony\user-bundle\Model\User.php:122
FOS\UserBundle\Model\User->addRole() at \vendor\friendsofsymfony\user-bundle\Model\User.php:416