Commit eeeaf240 by lmf

修复获取空路径图片路径函数错误

parent b8da9105
...@@ -458,6 +458,9 @@ class Data extends AbstractHelper ...@@ -458,6 +458,9 @@ class Data extends AbstractHelper
*/ */
public function getImageUrlFromPath($imagePath) public function getImageUrlFromPath($imagePath)
{ {
if (empty($imagePath)){
return ;
}
$systemPaths = $this->getSystemPaths(); $systemPaths = $this->getSystemPaths();
if (!preg_match('/^http/', $imagePath)) { if (!preg_match('/^http/', $imagePath)) {
foreach ($systemPaths as $systemPath) { foreach ($systemPaths as $systemPath) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment