Verified Commit ef64fe71 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(Actions) - pass actions class to php 82

Adapt  class actions from mgnt to php8.2
No related merge requests found
Showing with 6 additions and 6 deletions
+6 -6
...@@ -77,17 +77,17 @@ class Action ...@@ -77,17 +77,17 @@ class Action
$category = NULL; $category = NULL;
$class = NULL; $class = NULL;
$attribute = '0'; $attribute = '0';
if (strpos($acl, '/') !== FALSE) { if (str_contains((string) $acl, '/')) {
list($category, $class, $acl) = explode('/', $acl, 3); list($category, $class, $acl) = explode('/', (string) $acl, 3);
} }
if (strpos($acl, ':') !== FALSE) { if (str_contains((string) $acl, ':')) {
list($attribute, $acl) = explode(':', $acl, 2); list($attribute, $acl) = explode(':', (string) $acl, 2);
} }
$this->acl[] = [ $this->acl[] = [
'category' => $category, 'category' => $category,
'class' => $class, 'class' => $class,
'attribute' => $attribute, 'attribute' => $attribute,
'acl' => str_split($acl), 'acl' => str_split((string) $acl),
]; ];
} }
...@@ -275,7 +275,7 @@ class Action ...@@ -275,7 +275,7 @@ class Action
// Check rights // Check rights
foreach ($acl['acl'] as $part) { foreach ($acl['acl'] as $part) {
if (strpos($checkAcl, $part) === FALSE) { if (!str_contains((string) $checkAcl, (string) $part)) {
return FALSE; return FALSE;
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment