diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index ef8d07dfb45..b3027b90885 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1350,10 +1350,10 @@ class CMailFile // Build the list of image extensions $extensions = array_keys($this->image_types); - + $matches = array(); preg_match_all('/(?:"|\')([^"\']+\.('.implode('|', $extensions).'))(?:"|\')/Ui', $this->html, $matches); // If "xxx.ext" or 'xxx.ext' found - if ($matches) + if (! empty($matches)) { $i=0; foreach ($matches[1] as $full)