mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-29 02:03:31 +02:00
code cleanup and optimizations 3.1.32-dev-34
This commit is contained in:
@@ -322,7 +322,7 @@ class Smarty_Security
|
||||
// fall back
|
||||
return $this->isTrustedStaticClass($class_name, $compiler);
|
||||
}
|
||||
if ($params[ 2 ] == 'method') {
|
||||
if ($params[ 2 ] === 'method') {
|
||||
$allowed = $this->trusted_static_methods;
|
||||
$name = substr($params[ 0 ], 0, strpos($params[ 0 ], '('));
|
||||
} else {
|
||||
@@ -627,7 +627,7 @@ class Smarty_Security
|
||||
$this->_checkDir($this->smarty->_realpath($filepath, true), $this->_php_resource_dir);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if file is inside a valid directory
|
||||
*
|
||||
@@ -680,7 +680,7 @@ class Smarty_Security
|
||||
} elseif (is_object($security_class)) {
|
||||
throw new SmartyException("Class '" . get_class($security_class) . "' must extend Smarty_Security.");
|
||||
}
|
||||
if ($security_class == null) {
|
||||
if ($security_class === null) {
|
||||
$security_class = $smarty->security_class;
|
||||
}
|
||||
if (!class_exists($security_class)) {
|
||||
|
||||
Reference in New Issue
Block a user