From ce76d50ca4872ad28d5c8f367695b76481a3a500 Mon Sep 17 00:00:00 2001 From: Zetao Yang Date: Mon, 16 Oct 2017 20:29:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8C=B9=E9=85=8D=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=BA0=E6=97=B6empty=E5=88=A4=E6=96=AD=E5=87=BA?= =?UTF-8?q?=E9=94=99=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/phpspider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/phpspider.php b/core/phpspider.php index 327759f..3c5c697 100644 --- a/core/phpspider.php +++ b/core/phpspider.php @@ -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); }