summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework/Utility')
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index 60496ca329e..8d5bceb0b87 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -166,7 +166,10 @@ class SimpleContainer extends Container implements IContainer {
* @return string
*/
protected function sanitizeName($name) {
- return ltrim($name, '\\');
+ if (isset($name[0]) && $name[0] === '\\') {
+ return ltrim($name, '\\');
+ }
+ return $name;
}
}