fos:user:promote警告:in_array()期望参数2为数组

时间:2017-06-11 12:23:11

标签: symfony fosuserbundle

尝试宣传用户时出错:

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

0 个答案:

没有答案