Laravel5.5中不支持的操作数类型

时间:2019-01-18 04:41:30

标签: laravel

我正在根据Laravel5.5上的过程手册实施身份验证。

https://readouble.com/laravel/5.5/en/authentication.html

登录或注册成员时,发生以下错误。 (显示登录表单/注册表单即可)

local.ERROR:不支持的操作数类型{“ exception”:“ [对象](Symfony \ Component \ Debug \ Exception \ FatalThrowableError(代码:0):/ home / vagrant / Code / Laravel / vendor / laravel / framework / src / Illuminate / Support / Arr.php:219)

我不知道此错误是什么问题。 你能告诉我原因是什么吗?

Laravel.log

[2019-01-18 13:25:44] local.ERROR: Unsupported operand types {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Unsupported operand types at /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Support/Arr.php:219)
[stacktrace]
#0 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2793): Illuminate\\Support\\Arr::flatten(Array)
#1 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2095): Illuminate\\Database\\Query\\Builder->getBindings()
#2 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2083): Illuminate\\Database\\Query\\Builder->runSelect()
#3 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2569): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#4 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2084): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure))
#5 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2496): Illuminate\\Database\\Query\\Builder->get(Array)
#6 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2424): Illuminate\\Database\\Query\\Builder->aggregate('count', Array)
#7 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Validation/DatabasePresenceVerifier.php(55): Illuminate\\Database\\Query\\Builder->count()
#8 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Validation/Concerns/ValidatesAttributes.php(717): Illuminate\\Validation\\DatabasePresenceVerifier->getCount('users', 'email', 'user@test...', NULL, NULL, Array)
#9 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(398): Illuminate\\Validation\\Validator->validateUnique('email', 'ynishimoto@wbco...', Array, Object(Illuminate\\Validation\\Validator))
#10 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(277): Illuminate\\Validation\\Validator->validateAttribute('email', 'Unique')
#11 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(302): Illuminate\\Validation\\Validator->passes()
#12 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(314): Illuminate\\Validation\\Validator->fails()
#13 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Auth/RegistersUsers.php(31): Illuminate\\Validation\\Validator->validate()
#14 [internal function]: App\\Http\\Controllers\\Auth\\RegisterController->register(Object(Illuminate\\Http\\Request))
#15 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
#16 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('register', Array)
#17 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\Auth\\RegisterController), 'register')
#18 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
#19 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(682): Illuminate\\Routing\\Route->run()
#20 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#21 /home/vagrant/Code/Laravel/app/Http/Middleware/RedirectIfAuthenticated.php(24): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#22 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): App\\Http\\Middleware\\RedirectIfAuthenticated->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#23 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#24 /home/vagrant/Code/Laravel/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#25 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Laravel\\Passport\\Http\\Middleware\\CreateFreshApiToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#27 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#28 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#29 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#30 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(75): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#31 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#32 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#33 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#34 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#35 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#36 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#37 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#38 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#39 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#40 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#41 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#42 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#43 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#44 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#45 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#46 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(684): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#47 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(659): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#48 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#49 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php(614): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#50 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#51 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#52 /home/vagrant/Code/Laravel/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#53 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#54 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#55 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#56 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#57 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#58 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#59 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#60 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#61 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#62 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#63 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#64 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#65 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#66 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#67 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#68 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#69 /home/vagrant/Code/Laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#70 /home/vagrant/Code/Laravel/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#71 {main}
"} 

1 个答案:

答案 0 :(得分:3)

不知道您正在运行的PHP版本是很难确定的,但是几周前我也遇到了同样的错误。在新版本的PHP / xdebug中破坏更改很可能是一个问题。

这是Laravel的一个已知问题:请参见issues log here

最重要的是,您很可能正在运行PHP 7.3,这会通过xdebug与Laravel产生一些不兼容。您可以删除xdebug:sudo apt remove xdebug,或尝试升级到两者的最新版本(PHP 7.3.1 + xdebug master分支)。如果所有操作都失败了(应该这样做),则可以降级到PHP7.2,直到问题解决。