CakePHP error: class "String" not found in Acl

My Acl admin is corrupt, and I have no idea why, since I didn’t change anything when it worked.

When I go to /acl , I get the following error:

Error: class 'String' not found File: /app/Plugin/Acl/Controller/Component/AclReflectorComponent.php
Line: 17

 public function getPluginName($ctrlName = null) { $arr = String::tokenize($ctrlName, '/'); <----- Line: 17 if (count($arr) == 2) { return $arr[0]; } else { return false; } } 

I checked that in $ctrlName , and the value is Acl/Acl .

I'm completely lost here, what should I do?

+5
source share
1 answer

To make CakePHP compatible with PHP7, the String class has been deprecated from CakePHP 2.7 in favor of the CakeText class.

You need to download an updated version of your Acl plugin.

If you cannot find it, changing all occurrences of String using CakeText should fix the problem.

+12
source

Source: https://habr.com/ru/post/1237592/


All Articles