From d74b87d6f1957bf5681822b5898b02259090b595 Mon Sep 17 00:00:00 2001 From: liuyi Date: Mon, 11 May 2020 23:02:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPHP=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=BA7.4.4=E5=8F=8A=E4=BB=A5=E4=B8=8A=E6=97=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=AE=89=E8=A3=85=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8DPHP=E7=89=88=E6=9C=AC=E4=B8=BA7.4.4?= =?UTF-8?q?=E5=8F=8A=E4=BB=A5=E4=B8=8A=E6=97=B6=E7=94=9F=E6=88=90=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=9A=84=E9=94=99=E8=AF=AF=EF=BC=9AUnparenth?= =?UTF-8?q?esized=20`a=20=3F=20b=20:=20c=20=3F=20d=20:=20e`=20is=20depreca?= =?UTF-8?q?ted.=20Use=20either=20`(a=20=3F=20b=20:=20c)=20=3F=20d=20:=20e`?= =?UTF-8?q?=20or=20`a=20=3F=20b=20:=20(c=20=3F=20d=20:=20e)`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/base/ZipFolder.php | 2 +- thinkphp/library/think/db/Query.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extend/base/ZipFolder.php b/extend/base/ZipFolder.php index 0a9eb0fa7..8f429feef 100755 --- a/extend/base/ZipFolder.php +++ b/extend/base/ZipFolder.php @@ -78,7 +78,7 @@ class ZipFolder */ public function Zip($zipfile, $folder, $ignored = null) { - $this->ignored_names = is_array($ignored) ? $ignored : $ignored ? array($ignored) : array(); + $this->ignored_names = is_array($ignored) ? $ignored : ($ignored ? array($ignored) : array()); if($this->zip->open($zipfile, \ZipArchive::CREATE) !== true) { throw new Exception("cannot open <$zipfile>\n"); diff --git a/thinkphp/library/think/db/Query.php b/thinkphp/library/think/db/Query.php index 2704c8df7..5c9cfa9b9 100755 --- a/thinkphp/library/think/db/Query.php +++ b/thinkphp/library/think/db/Query.php @@ -565,7 +565,7 @@ class Query $seq = (ord(substr($type($value), 0, 1)) % $rule['num']) + 1; } else { // 按照字段的首字母的值分表 - $seq = (ord($value{0}) % $rule['num']) + 1; + $seq = (ord($value[0]) % $rule['num']) + 1; } } return $this->getTable() . '_' . $seq;