CakePHP错误:在Acl中找不到类'String'
My Acl admin is corrupt and I have no idea why, since I haven't changed anything from when it used to work.
我的Acl管理员已经腐败,我不知道为什么,因为我从未改变过以后的工作。
When I go to /acl
, I get the following error:
当我去/ acl时,我收到以下错误:
Error: Class 'String' not found File: /app/Plugin/Acl/Controller/Component/AclReflectorComponent.php
Line: 17错误:找不到类'String'文件:/app/Plugin/Acl/Controller/Component/AclReflectorComponent.php行:17
public function getPluginName($ctrlName = null)
{
$arr = String::tokenize($ctrlName, '/'); <----- Line: 17
if (count($arr) == 2) {
return $arr[0];
} else {
return false;
}
}
I checked what's in $ctrlName
and the value is Acl/Acl
.
我检查了$ ctrlName中的内容,值是Acl / Acl。
I'm completely lost here, what should I do?
我完全迷失在这里,我该怎么办?
1 个解决方案
#1
15
In order to make CakePHP compatible with PHP7, the String
class has been deprecated as of CakePHP 2.7 in favour of the CakeText
class.
为了使CakePHP与PHP7兼容,从CakePHP 2.7开始,不推荐使用String类,而是使用CakeText类。
You have to download an up to date version of your Acl Plugin.
您必须下载Acl插件的最新版本。
If you can't find one, changing all occurrences of String
with CakeText
should fix the problem.
如果找不到,使用CakeText更改所有出现的String应该可以解决问题。
更多相关文章
- fgetcsv()错误地将双引号添加到第一行的第一个元素
- 错误1452:无法添加或更新子行:外键约束失败
- Oracle相当于MySQL代码“插入虚拟”以返回错误消息
- MySQL添加外键错误1215
- 在SQL中声明@变量返回错误
- Linux第二篇----使用rpm方法安装MySQL(含各种出现的错误和排错)
- MySQL查询中的变量会导致错误
- mysql编译安装后各种常见错误集锦
- org.json Android系统错误。JSONException:在字符0处输入结束