mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°4058 - fix PHP Deprecated base64_decodestrlen : Passing nul
This commit is contained in:
@@ -130,15 +130,13 @@ class SimpleCrypt
|
||||
*/
|
||||
function Decrypt($key, $string)
|
||||
{
|
||||
try{
|
||||
return $this->oEngine->Decrypt($key,$string);
|
||||
} catch(\Exception $e){
|
||||
if (strlen($string)==0){
|
||||
IssueLog::Warning("Cannot decrypt empty/null value", null, ['msg' => $e->getMessage(), 'stack' => $e->getTraceAsString()]);
|
||||
return $string;
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
if (is_null($string) || strlen($string) == 0) {
|
||||
IssueLog::Warning("Cannot decrypt empty/null value");
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
return $this->oEngine->Decrypt($key, $string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user