MINOR: fixed setName() (from r98282)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102640 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 03:19:28 +00:00
parent c5fda512d6
commit 2978728265

View File

@ -310,7 +310,7 @@ class File extends DataObject {
$name = ereg_replace(' +','-',trim($name)); $name = ereg_replace(' +','-',trim($name));
$name = ereg_replace('[^A-Za-z0-9.+_\-]','',$name); $name = ereg_replace('[^A-Za-z0-9.+_\-]','',$name);
while($name[0] == '_' || $name[0] == '.') { while(!empty($name) && ($name[0] == '_' || $name[0] == '.')) {
$name = substr($name, 1); $name = substr($name, 1);
} }