mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
3daa7c9e1f
commit
7f30d75739
1 changed files with 2 additions and 4 deletions
|
@ -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 === '\\';
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Add table
Reference in a new issue