插件管理细节优化

feat/task1-c-wallet
devil_gong 2019-10-28 11:26:22 +08:00
parent 97dd73c053
commit 6688a1f5c6
1 changed files with 8 additions and 5 deletions

View File

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