N°4058 - fix PHP Deprecated base64_decodestrlen : Passing nul

This commit is contained in:
odain
2025-10-21 08:09:48 +02:00
parent bfc583e6b5
commit 8ade0a6e85

View File

@@ -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);
}
/**