Fixed: issues caused due to null in strtolower in admin translation controller
This commit is contained in:
@@ -1734,7 +1734,7 @@ class ToolsCore
|
||||
|
||||
public static function strtolower($str)
|
||||
{
|
||||
if (is_array($str)) {
|
||||
if (is_array($str) || is_null($str)) {
|
||||
return false;
|
||||
}
|
||||
if (function_exists('mb_strtolower')) {
|
||||
@@ -1766,7 +1766,7 @@ class ToolsCore
|
||||
|
||||
public static function strtoupper($str)
|
||||
{
|
||||
if (is_array($str)) {
|
||||
if (is_array($str) || is_null($str)) {
|
||||
return false;
|
||||
}
|
||||
if (function_exists('mb_strtoupper')) {
|
||||
@@ -1777,7 +1777,7 @@ class ToolsCore
|
||||
|
||||
public static function substr($str, $start, $length = false, $encoding = 'utf-8')
|
||||
{
|
||||
if (is_array($str)) {
|
||||
if (is_array($str) || is_null($str))
|
||||
return false;
|
||||
}
|
||||
if (function_exists('mb_substr')) {
|
||||
|
||||
@@ -1112,7 +1112,7 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
|
||||
foreach ($matches as $key) {
|
||||
$md5_key = md5($key);
|
||||
$module_key = '<{'.Tools::strtolower($module_name).'}'.strtolower($theme_name).'>'.Tools::strtolower($template_name).'_'.$md5_key;
|
||||
$module_key = '<{'.Tools::strtolower($module_name).'}'.Tools::strtolower($theme_name).'>'.Tools::strtolower($template_name).'_'.$md5_key;
|
||||
$default_key = '<{'.Tools::strtolower($module_name).'}prestashop>'.Tools::strtolower($template_name).'_'.$md5_key;
|
||||
// to avoid duplicate entry
|
||||
if (!in_array($module_key, $array_check_duplicate)) {
|
||||
|
||||
Reference in New Issue
Block a user