Fix decryptData null type error and live analytics overflow

This commit is contained in:
Hamza-Ayed
2026-07-23 20:42:48 +03:00
parent 12e70f3d7e
commit 1e785061ec
3 changed files with 30 additions and 20 deletions
+2 -1
View File
@@ -44,8 +44,9 @@ class EncryptionHelper
}
// ─── فك تشفير نص (يدعم CBC والـ GCM المستقبلي) ───────────
public function decryptData(string $cipherText): string|false
public function decryptData(?string $cipherText): string|false
{
if (empty($cipherText)) return '';
// تحقق إن كان مشفر بالنظام الجديد
if (str_starts_with($cipherText, self::PREFIX_GCM)) {
$raw = base64_decode(substr($cipherText, strlen(self::PREFIX_GCM)), true);