Array to string conversion - Project Crash [Laravel]

烂漫一生 提交于 2019-12-14 03:35:45

问题


I am getting an error like this:

Array to string conversion

Inside

/var/.../vendor/cartalyst/sentry/src/Cartalyst/Sentry/SentryServiceProvider.php

Code snippet where the error was thrown:

throw new \InvalidArgumentException("Invalid hasher [$hasher] chosen for Sentry.");

I was doing ordianry work in one of my controllers and this error occured when I clicked on one of the buttons inside my blade.

I have commented the code out but the error still is being displayed, not only on this one page but on every single one in my project. I can't even go to my /home/index.php page.

I have done

composer update

inside my project but that did not help. What can fix the problem?

@update

Yes I have checked sentry config file before I've made a new topic. I have the same problem when I load older versions (which do not contain the latest changes I've made today) of my project on to apache server which is running on Ubuntu 14.04.

Ideas what causes the problem?


回答1:


In the config for Sentry you have to define a hasher. It has to be a string. It can be 'native', 'bcrypt', 'sha256' or 'whirlpool'. Apparently in your app, it's not a string, but an array. Check your configuration. It's probably in app/config/packages/cartalyst/sentry/config.php



来源:https://stackoverflow.com/questions/39144324/array-to-string-conversion-project-crash-laravel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!