diff --git a/extend/base/ZipFolder.php b/extend/base/ZipFolder.php index 0a9eb0fa7aa88ee63fe661dec88b24b27da4bfb0..8f429feef63c67b9beb93592d5ec6f39935697db 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 2704c8df78a69e94fca5e161a16053c2ebf8339d..5c9cfa9b9eb393456ca2454ff660c4310f718283 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;