From fa479930375e3240358f9e459a93cc5613a8f9e3 Mon Sep 17 00:00:00 2001 From: Jone Shen Date: Mon, 24 Mar 2025 19:58:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dstr=5Fpad=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=B9=B6=E4=B8=8D=E4=BC=9A=E8=A1=A5=E5=85=85=3D?= =?UTF-8?q?=E5=8F=B7=E7=9A=84=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/think-library/src/extend/CodeExtend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/think-library/src/extend/CodeExtend.php b/plugin/think-library/src/extend/CodeExtend.php index 20f1d1059..78a0af32a 100644 --- a/plugin/think-library/src/extend/CodeExtend.php +++ b/plugin/think-library/src/extend/CodeExtend.php @@ -143,7 +143,7 @@ class CodeExtend */ public static function deSafe64(string $text): string { - return base64_decode(str_pad(strtr($text, '-_', '+/'), strlen($text) % 4, '=')); + return base64_decode(str_pad(strtr($text, '-_', '+/'), (int) (ceil(strlen($text) / 4) * 4), '=')); } /**