Argument 2 passed to Illuminate\Log\LogManager::info() must be of the type array, string given

其他环境
¥5.00

程序报错:


Argument 2 passed to Illuminate\Log\LogManager::info() must be of the type array, string given


详细堆栈如下:

Symfony\Component\Debug\Exception\FatalThrowableError: Argument 2 passed to Illuminate\Log\LogManager::info() must be of the type array, string given, called in /www/wwwrootvendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 239 in file /www/wwwrootvendor/laravel/framework/src/Illuminate/Log/LogManager.php on line 542
Stack trace:
  1. Symfony\Component\Debug\Exception\FatalThrowableError->() /www/wwwrootvendor/laravel/framework/src/Illuminate/Log/LogManager.php:542
  2. Illuminate\Log\LogManager->info() /www/wwwrootvendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:239
  3. Illuminate\Support\Facades\Facade->__callStatic() /www/wwwrootapp/Http/Controllers/Api/DrawController.php:519
  4. App\Http\Controllers\Api\DrawController->sync() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
  5. call_user_func_array() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Controller.php:54
  6. Illuminate\Routing\Controller->callAction() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45
  7. Illuminate\Routing\ControllerDispatcher->dispatch() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Route.php:219
  8. Illuminate\Routing\Route->runController() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Route.php:176
  9. Illuminate\Routing\Route->run() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Router.php:680
 10. Illuminate\Routing\Router->Illuminate\Routing\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
 11. Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41
 12. Illuminate\Routing\Middleware\SubstituteBindings->handle() /www/wwwrootvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
 13. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
 14. Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php:58
 15. Illuminate\Routing\Middleware\ThrottleRequests->handle() /www/wwwrootvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
 16. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
 17. Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
 18. Illuminate\Pipeline\Pipeline->then() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Router.php:682
 19. Illuminate\Routing\Router->runRouteWithinStack() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Router.php:657
 20. Illuminate\Routing\Router->runRoute() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Router.php:623
 21. Illuminate\Routing\Router->dispatchToRoute() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Router.php:612
 22. Illuminate\Routing\Router->dispatch() /www/wwwrootvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176
 23. Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30
 24. Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21
 25. Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() /www/wwwrootvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
 26. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
 27. Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27
 28. Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle() /www/wwwrootvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
 29. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
 30. Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62
 31. Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle() /www/wwwrootvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
 32. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
 33. Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() /www/wwwrootvendor/fideloper/proxy/src/TrustProxies.php:57
 34. Fideloper\Proxy\TrustProxies->handle() /www/wwwrootvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163
 35. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53
 36. Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() /www/wwwrootvendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104
 37. Illuminate\Pipeline\Pipeline->then() /www/wwwrootvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151
 38. Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() /www/wwwrootvendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116
 39. Illuminate\Foundation\Http\Kernel->handle() /www/wwwrootpublic/index.php:55

最佳答案

原因分析

传递给方法的参数和方法要求的参数不一样。你这里LogManager::info()这个方法的第二个参数要求数组,你给出的参数是字符串

检查给LogManager::info()的传参的数据格式是否和方法要求的一致

咖啡加糖_ T0 被采纳率100%
2020-12-15 15:50
打赏 0 0
页面统计
237 访问
0 帮助
0.00 打赏

hierror 2019 © hierror.com 京ICP备13026190号-1

通知消息
  • 暂无任何消息