数组到字符串的转换-项目崩溃[Laravel] [英] Array to string conversion - Project Crash [Laravel]
问题描述
我遇到这样的错误:
数组到字符串的转换
Array to string conversion
内部
/var/.../vendor/cartalyst/sentry/src/Cartalyst/Sentry/SentryServiceProvider.php
/var/.../vendor/cartalyst/sentry/src/Cartalyst/Sentry/SentryServiceProvider.php
引发错误的代码段:
抛出新的\ InvalidArgumentException(为哨兵选择了无效的哈希[$ hasher].");
throw new \InvalidArgumentException("Invalid hasher [$hasher] chosen for Sentry.");
我正在我的一个控制器中执行Ordianry工作,并且当我单击刀片内的一个按钮时发生了此错误.
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.
我已注释掉代码,但错误仍然在显示,不仅在此页面上,而且在项目中的每个页面上.我什至无法进入我的/home/index.php页面.
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.
我已经完成
作曲家更新
composer update
在我的项目中,但这没有帮助.什么可以解决问题?
inside my project but that did not help. What can fix the problem?
@update
是的,在创建新主题之前,我已经检查了哨兵配置文件.将我的项目的旧版本(不包含我今天所做的最新更改)加载到在Ubuntu 14.04上运行的apache服务器时,我遇到相同的问题.
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?
推荐答案
在Sentry的配置中,您必须定义一个哈希器. 它必须是一个字符串.它可以是本地","bcrypt","sha256"或漩涡".显然,在您的应用中,它不是字符串,而是数组.检查您的配置.它可能在app/config/packages/cartalyst/sentry/config.php
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
这篇关于数组到字符串的转换-项目崩溃[Laravel]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!