Optimize sanitizeName

This commit is contained in:
Roeland Jago Douma 2016-09-16 09:52:52 +02:00
parent 9fa288f12b
commit e200eda18d
No known key found for this signature in database
GPG key ID: 1E152838F164D13B

View file

@ -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;
}
}