!10 1.8.1+在PHP7.4以上无法正常按照和生成微信小程序,这个PR修复了这些问题

Merge pull request !10 from liuyi/master
This commit is contained in:
Devil 2020-05-12 10:15:55 +08:00 committed by Gitee
commit a50796362a
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -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;