code cleanup and optimizations 3.1.32-dev-34

This commit is contained in:
Uwe Tews
2017-11-06 01:02:56 +01:00
parent 3799714d53
commit 3fc8abeb98
99 changed files with 600 additions and 621 deletions
+3 -3
View File
@@ -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)) {