From 6688a1f5c60c332026f30f06c18b8c85bdd76be0 Mon Sep 17 00:00:00 2001 From: devil_gong Date: Mon, 28 Oct 2019 11:26:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/PluginsService.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/application/service/PluginsService.php b/application/service/PluginsService.php index 7335df767..657d0c30c 100755 --- a/application/service/PluginsService.php +++ b/application/service/PluginsService.php @@ -72,13 +72,16 @@ class PluginsService { foreach($data as $k=>$v) { - $ext = strrchr(substr($v, -6), '.'); - if($ext !== false) + if(is_string($v) && !empty($v)) { - if(in_array($ext, $attachment_ext)) + $ext = strrchr(substr($v, -6), '.'); + if($ext !== false) { - $data[$k.'_old'] = $v; - $data[$k] = ResourcesService::AttachmentPathViewHandle($v); + if(in_array($ext, $attachment_ext)) + { + $data[$k.'_old'] = $v; + $data[$k] = ResourcesService::AttachmentPathViewHandle($v); + } } } }