mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 19:54:14 +02:00
- improvement replaced some strlen($foo) > 3 calls by isset($foo[3])
This commit is contained in:
@@ -364,7 +364,7 @@ class Smarty_Security {
|
||||
return true;
|
||||
}
|
||||
// abort if we've reached root
|
||||
if (($pos = strrpos($directory, DS)) === false || strlen($directory) < 2) {
|
||||
if (($pos = strrpos($directory, DS)) === false || !isset($directory[2])) {
|
||||
break;
|
||||
}
|
||||
// bubble up one level
|
||||
@@ -412,7 +412,7 @@ class Smarty_Security {
|
||||
return true;
|
||||
}
|
||||
// abort if we've reached root
|
||||
if (($pos = strrpos($directory, DS)) === false || strlen($directory) < 2) {
|
||||
if (($pos = strrpos($directory, DS)) === false || !isset($directory[2])) {
|
||||
break;
|
||||
}
|
||||
// bubble up one level
|
||||
|
||||
Reference in New Issue
Block a user