Skip to content

Commit

Permalink
修复匹配字段为0时empty判断出错的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetao Yang authored and Zetao Yang committed Oct 16, 2017
1 parent f1b8722 commit ce76d50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/phpspider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,8 @@ public function get_fields($confs, $html, $url, $page)
// field不为空而且存在子配置
if (isset($values) && !empty($conf['children']))
{
if (!$values)
// 如果提取到的结果是字符串,就转为数组,方便下面统一foreach
if (!is_array($values))
{
$values = array($values);
}
Expand Down

0 comments on commit ce76d50

Please sign in to comment.