首页 文章

Symfony \ Component \ Debug \ Exception \ FatalThrowableError:输入错误

提问于
浏览
1

我在laravel 5.6项目中运行“php artisan botman:list-drivers -v”命令并抛出此错误:

Symfony \ Component \ Debug \ Exception \ FatalThrowableError:类型错误:参数1传递给Symfony \ Component \ Console \ Helper \ Table :: setRows()必须是类型数组,给定对象,在C:\ xampp \ htdocs中调用\ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Console \ Command.php位于第411行的C:\ xampp \ htdocs \ chatbot \ vendor \ symfony \ console \ Helper \ Table.php:222
218 |
219 |返回$ this;
220 | }
221 |

222 | public function setRows(array $ rows)
223 | {
224 | $ this-> rows = array();
225 |
226 | return $ this-> addRows($ rows);
异常跟踪:1 Symfony \ Component \ Console \ Helper \ Table :: setRows(Object(Tightenco \ Collect \ Support \ Collection))C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Console \ Command .php:411 2 Illuminate \ Console \ Command :: table(对象(Tightenco \ Collect \ Support \ Collection))C:\ xampp \ htdocs \ chatbot \ vendor \ botman \ studio-addons \ src \ Console \ Commands \ BotManListDrivers . php:74 3 BotMan \ Studio \ Console \ Commands \ BotManListDrivers :: handle()C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Container \ BoundMethod.php:29 4 call_user_func_array([]) C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Container \ BoundMethod.php:29 5 Illuminate \ Container \ BoundMethod :: Illuminate \ Container ()C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Container \ BoundMethod.php:87 6 Illuminate \ Container \ BoundMethod :: callBoundMethod(Object(Illuminate \ Foundation \ Application),Object(Closure))C:\ xampp \ htdocs \ chatbot \供应商\ laravel \框架的\ src \补偿发光e \ Container \ BoundMethod.php:31 7 Illuminate \ Container \ BoundMethod :: call(Object(Illuminate \ Foundation \ Application),[])C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Container \ Container.php:564 8 Illuminate \ Container \ Container :: call()C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Console \ Command.php:183 9 Illuminate \ Console \ Command :: execute(Object(Symfony \ Component \ Console \ Input \ ArgvInput),Object(Illuminate \ Console \ OutputStyle))C:\ xampp \ htdocs \ chatbot \ vendor \ symfony \ console \ Command \ Command.php:252 10 Symfony \ Component \ Console \ Command \ Command :: run(对象(Symfony \ Component \ Console \ Input \ ArgvInput),对象(Illuminate \ Console \ OutputStyle))C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Console \ Command.php:170 11 Illuminate \ Console \ Command :: run(对象(Symfony \ Component \ Console \ Input \ ArgvInput),对象(Symfony \ Component \ Console \ Output \ ConsoleOutput))C:\ xampp \ htdocs \ chatbot \ vendor \ symfony \ console \ Application.php:865 12 Symfony \ Component \ Console \ Application :: doRunCommand(Object(BotMan \ Studio \ Console \ Commands \ BotManListDrivers),Object(Symfony \ Component \ Console \ Input \ ArgvInput),Object(Symfony \ Component \ Console \ Output \ ConsoleOutput))C :\ xampp \ htdocs \ chatbot \ vendor \ symfony \ console \ Application.php:241 13 Symfony \ Component \ Console \ Application :: doRun(对象(Symfony \ Component \ Console \ Input \ ArgvInput),对象(Symfony \ Component \ Console \ Output \ ConsoleOutput))C:\ xampp \ htdocs \ chatbot \ vendor \ symfony \ console \ Application.php:143 14 Symfony \ Component \ Console \ Application :: run(对象(Symfony \ Component \ Console \ Input \ ArgvInput) ),对象(Symfony \ Component \ Console \ Output \ ConsoleOutput))C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Console \ Application.php:88 15 Illuminate \ Console \ Application :: run (对象(Symfony \ Component \ Console \ Input \ ArgvInput),对象(Symfony \ Component \ Console \ Output \ ConsoleOutput))C:\ xampp \ htdocs \ chatbot \ vendor \ laravel \ framework \ src \ Illuminate \ Foundation \ Console \ Kernel.php:121 16 Il luminate \ Foundation \ Console \ Kernel :: handle(对象(Symfony \ Component \ Console \ Input \ ArgvInput),对象(Symfony \ Component \ Console \ Output \ ConsoleOutput))C:\ xampp \ htdocs \ chatbot \ artisan:37

有什么解决方案吗?我在新的laravel项目工作,我无法弄清楚问题的位置 .

1 回答

  • 1

    您正在传递 $rows ,它是 setRows 函数的对象,它正在寻找一个数组 .

相关问题