diff --git a/include/management/class_management.inc b/include/management/class_management.inc index d613a0c2c65c3b9a34112baec3d8a4b2de645a6b..de189937b2ac4fdce32ab55648b4257e72a312b5 100755 --- a/include/management/class_management.inc +++ b/include/management/class_management.inc @@ -99,11 +99,11 @@ class management implements FusionDirectoryDialog global $config, $class_mapping; if ($objectTypes === FALSE) { - $plInfos = pluglist::pluginInfos(get_class($this)); + $plInfos = pluglist::pluginInfos(static::class); $objectTypes = $plInfos['plManages']; } - if (!preg_match('/^geticon/', $this->icon)) { + if (!preg_match('/^geticon/', (string) $this->icon)) { $this->icon = get_template_path($this->icon); } @@ -111,8 +111,8 @@ class management implements FusionDirectoryDialog foreach ($objectTypes as $key => $type) { try { objects::infos($type); - $objectTypes[$key] = strtoupper($type); - } catch (NonExistingObjectTypeException $e) { + $objectTypes[$key] = strtoupper((string) $type); + } catch (NonExistingObjectTypeException) { unset($objectTypes[$key]); } } @@ -156,7 +156,7 @@ class management implements FusionDirectoryDialog protected function setUpHeadline () { - $plInfos = pluglist::pluginInfos(get_class($this)); + $plInfos = pluglist::pluginInfos(static::class); $this->headline = $plInfos['plShortName']; $this->title = $plInfos['plTitle']; @@ -362,7 +362,7 @@ class management implements FusionDirectoryDialog if (!isset($this->columnConfiguration)) { // LDAP configuration - $this->columnConfiguration = $config->getManagementConfig(get_class($this)); + $this->columnConfiguration = $config->getManagementConfig(static::class); } if (!isset($this->columnConfiguration)) { @@ -430,8 +430,8 @@ class management implements FusionDirectoryDialog protected function handleSubAction (array $action): bool { - if (preg_match('/^tab_/', $action['subaction'])) { - $tab = preg_replace('/^tab_/', '', $action['subaction']); + if (preg_match('/^tab_/', (string) $action['subaction'])) { + $tab = preg_replace('/^tab_/', '', (string) $action['subaction']); if (isset($this->tabObject->by_object[$tab])) { $this->tabObject->current = $tab; } else { @@ -768,7 +768,7 @@ class management implements FusionDirectoryDialog if (static::$skipTemplates) { return; } - $type = preg_replace('/^template_/', '', $action['subaction']); + $type = preg_replace('/^template_/', '', (string) $action['subaction']); $this->currentDn = 'new'; @@ -793,7 +793,7 @@ class management implements FusionDirectoryDialog } $type = $this->listing->getEntry($dn)->getTemplatedType(); } else { - $type = preg_replace('/^apply_/', '', $action['subaction']); + $type = preg_replace('/^apply_/', '', (string) $action['subaction']); } $this->dialogObject = new templateDialog($this, $type, $dn); } @@ -1124,7 +1124,7 @@ class management implements FusionDirectoryDialog } else { $error = new FusionDirectoryPermissionError(msgPool::permDelete($dn)); $error->display(); - logging::log('security', 'management/' . get_class($this), $dn, [], 'Tried to trick deletion.'); + logging::log('security', 'management/' . static::class, $dn, [], 'Tried to trick deletion.'); } }