Closes #5735, Replace preg_match in Folder::isSlashTerm

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7938 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2008-12-18 00:22:57 +00:00
parent 3daa7c9e1f
commit 7f30d75739

View file

@ -761,10 +761,8 @@ class Folder extends Object {
* @static
*/
function isSlashTerm($path) {
if (preg_match('/[\/\\\]$/', $path)) {
return true;
}
return false;
$lastChar = $path[strlen($path) - 1];
return $lastChar === '/' || $lastChar === '\\';
}
}
?>