Browse Source

Merge pull request #370 from githubxp/patch-1

Update wechat.class.php
dodge 3 years ago
parent
commit
73b318a818
1 changed files with 1 additions and 1 deletions
  1. 1 1
      wechat.class.php

+ 1 - 1
wechat.class.php

@@ -4596,7 +4596,7 @@ class PKCS7Encoder
         //计算需要填充的位数
         $amount_to_pad = PKCS7Encoder::$block_size - ($text_length % PKCS7Encoder::$block_size);
         if ($amount_to_pad == 0) {
-            $amount_to_pad = PKCS7Encoder::block_size;
+            $amount_to_pad = PKCS7Encoder::$block_size;
         }
         //获得补位所用的字符
         $pad_chr = chr($amount_to_pad);