Optimize sanitizeName
This commit is contained in:
parent
9fa288f12b
commit
e200eda18d
1 changed files with 4 additions and 1 deletions
|
@ -157,7 +157,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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue