strpos()期望参数1为字符串,数组给定CORE / Cake / I18n / I18n.php,第140行

strpos()期望参数1为字符串,数组给定CORE / Cake / I18n / I18n.php,第140行

问题描述:

I'm using Cakephp 2.2.2 on this project and I'm getting this error:

Warning (2): strpos() expects parameter 1 to be string, array given [CORE/Cake/I18n/I18n.php, line 140]

I'm not sure what is causing this. I'm not using I18n that I know of and I'm not sure what I did do get this install of Cake to do this.

In addition I'm also getting this error, however, I believed this one is caused by the first.

Warning (2): Illegal offset type in isset or empty [CORE/Cake/I18n/I18n.php, line 196]

我在这个项目上使用Cakephp 2.2.2,我收到了这个错误: p> \ n

 警告(2):strpos()期望参数1为字符串,给定数组为[CORE / Cake / I18n / I18n.php,第140行] 
  code>  pre>  
 
 

我不确定是什么原因造成的。 我没有使用我知道的I18n而且我不确定我做了什么来安装这个Cake来执行此操作。 p>

此外我也收到此错误, 但是,我认为这是由第一个引起的。 p>

 警告(2):isset中的非法偏移类型或为空[CORE / Cake / I18n / I18n.php,line  196] 
  code>  pre> 
  div>

You are probably passing an integer, array, or some other type to __(). Have a look at the docs for proper usage.