diff --git a/application/service/PluginsService.php b/application/service/PluginsService.php index 7335df767987d8c0b934cfd4353609e64f90386f..657d0c30cd1ff481f43db9e69325f6d1eeb43af4 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); + } } } }