From 2a0773b488637a3c95505ceef914a8992e3aedb5 Mon Sep 17 00:00:00 2001 From: yansongda Date: Fri, 6 Aug 2021 18:40:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=81=E4=B9=A6=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=81=A5=E5=A3=AE=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Plugin/Alipay/PreparePlugin.php | 2 +- tests/Cert/alipayRootCert.crt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Plugin/Alipay/PreparePlugin.php b/src/Plugin/Alipay/PreparePlugin.php index b7df836..8f9f52b 100644 --- a/src/Plugin/Alipay/PreparePlugin.php +++ b/src/Plugin/Alipay/PreparePlugin.php @@ -121,7 +121,7 @@ class PreparePlugin implements PluginInterface $exploded = explode('-----END CERTIFICATE-----', file_get_contents($path)); foreach ($exploded as $cert) { - if (empty($cert)) { + if (empty(trim($cert))) { continue; } diff --git a/tests/Cert/alipayRootCert.crt b/tests/Cert/alipayRootCert.crt index d370e5b..6bf33b6 100644 --- a/tests/Cert/alipayRootCert.crt +++ b/tests/Cert/alipayRootCert.crt @@ -85,4 +85,7 @@ UugDo9u8igJORYA+5ms0s5sCUySqbQ2R5z/GoceyI9LdxIVa1RjVX8pYOj8JFwtn DJN3ftSFvNMYwRuILKuqUYSHc2GPYiHVflDh5nDymCMOQFcFG3WsEuB+EYQPFgIU 1DHmdZcz7Llx8UOZXX2JupWCYzK1XhJb+r4hK5ncf/w8qGtYlmyJpxk3hr1TfUJX Yf4Zr0fJsGuv ------END CERTIFICATE----- \ No newline at end of file +-----END CERTIFICATE----- + + +