mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
rename "readonly" policy to "readonlys", as "readonly" is a reserved word from PHP 8.1 on
This commit is contained in:
parent
ecf15cf982
commit
12b3d9016c
@ -474,6 +474,12 @@ abstract class admin_cmd
|
||||
{
|
||||
$data['data'] = json_php_unserialize($data['data']);
|
||||
}
|
||||
// "Readonly" policy need to be renamed (to "Readonlys") as readonly is a reserved word in PHP 8.1+
|
||||
if ($data['type'] === 'Policy\\Policies\\Readonly')
|
||||
{
|
||||
$data['type'] .= 's';
|
||||
$data['policy'] .= 's';
|
||||
}
|
||||
if (!(class_exists($class = 'EGroupware\\'.$data['type']) || // namespaced class
|
||||
class_exists($class = $data['type'])) || $data['type'] == 'admin_cmd')
|
||||
{
|
||||
@ -601,7 +607,9 @@ abstract class admin_cmd
|
||||
{
|
||||
$label = $class::name();
|
||||
}
|
||||
elseif (class_exists('EGroupware\\' . $class))
|
||||
elseif (class_exists('EGroupware\\' . $class) ||
|
||||
// "Readonly" policy need to be renamed (to "Readonlys") as readonly is a reserved word in PHP 8.1+
|
||||
class_exists('EGroupware\\' . ($class .= 's')))
|
||||
{
|
||||
$class = 'EGroupware\\' . $class;
|
||||
$label = $class::name();
|
||||
@ -1485,4 +1493,4 @@ abstract class admin_cmd
|
||||
static::$stati[ $this->status ],
|
||||
Api\DateTime::to($this->created));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user