From 9a04549c86b488e88ac06f154dcbea75464bceea Mon Sep 17 00:00:00 2001 From: augushong Date: Fri, 25 Nov 2022 17:16:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E8=84=B1=E6=95=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/tools/phpparser/ReadEnvVisitorNodeTools.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/common/tools/phpparser/ReadEnvVisitorNodeTools.php b/app/common/tools/phpparser/ReadEnvVisitorNodeTools.php index 9f721ef..bbf3423 100644 --- a/app/common/tools/phpparser/ReadEnvVisitorNodeTools.php +++ b/app/common/tools/phpparser/ReadEnvVisitorNodeTools.php @@ -4,6 +4,7 @@ namespace app\common\tools\phpparser; use PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Cast\Bool_; use PhpParser\Node\Expr\ConstFetch; @@ -97,6 +98,11 @@ class ReadEnvVisitorNodeTools extends NodeVisitorAbstract if (is_array($value)) { return new Array_($value); } else if (is_string($value)) { + + return new FuncCall(new Name('base64_decode'), [ + new Arg(new String_(base64_encode($value))) + ]); + return new String_($value); } else if (is_integer($value)) { return new LNumber($value);