diff options
Diffstat (limited to 'lib/private/ServerContainer.php')
-rw-r--r-- | lib/private/ServerContainer.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php index e1ead1bfeda..daa480a75d1 100644 --- a/lib/private/ServerContainer.php +++ b/lib/private/ServerContainer.php @@ -159,7 +159,7 @@ class ServerContainer extends SimpleContainer { // so we can throw directly throw $e; } - } elseif (strpos($name, 'OC\\Settings\\') === 0 && substr_count($name, '\\') >= 3) { + } elseif (str_starts_with($name, 'OC\\Settings\\') && substr_count($name, '\\') >= 3) { $segments = explode('\\', $name); try { $appContainer = $this->getAppContainer(strtolower($segments[1]), $segments[1]); @@ -179,7 +179,7 @@ class ServerContainer extends SimpleContainer { * @return DIContainer|null */ public function getAppContainerForService(string $id): ?DIContainer { - if (strpos($id, 'OCA\\') !== 0 || substr_count($id, '\\') < 2) { + if (!str_starts_with($id, 'OCA\\') || substr_count($id, '\\') < 2) { return null; } |