aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/ServerContainer.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/ServerContainer.php')
-rw-r--r--lib/private/ServerContainer.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/ServerContainer.php b/lib/private/ServerContainer.php
index e53737990e8..a8583bd6875 100644
--- a/lib/private/ServerContainer.php
+++ b/lib/private/ServerContainer.php
@@ -157,7 +157,7 @@ class ServerContainer extends SimpleContainer {
// Didn't find the service or the respective app container,
// ignore it and fall back to the core container.
}
- } 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]);
@@ -177,7 +177,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;
}