aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/DownloadImages.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/DownloadImages.php')
-rw-r--r--src/Wallabag/CoreBundle/Helper/DownloadImages.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php
index 487a3a23..cc3dcfce 100644
--- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php
+++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php
@@ -198,7 +198,7 @@ class DownloadImages
198 // Must be one or more digits followed by w OR x 198 // Must be one or more digits followed by w OR x
199 $pattern = "/(?:[^\"'\s]+\s*(?:\d+[wx])+)/"; 199 $pattern = "/(?:[^\"'\s]+\s*(?:\d+[wx])+)/";
200 preg_match_all($pattern, $srcsetAttribute, $matches); 200 preg_match_all($pattern, $srcsetAttribute, $matches);
201 $srcset = call_user_func_array('array_merge', $matches); 201 $srcset = \call_user_func_array('array_merge', $matches);
202 $srcsetUrls = array_map(function ($src) { 202 $srcsetUrls = array_map(function ($src) {
203 return trim(explode(' ', $src, 2)[0]); 203 return trim(explode(' ', $src, 2)[0]);
204 }, $srcset); 204 }, $srcset);
@@ -308,7 +308,7 @@ class DownloadImages
308 $this->logger->debug('DownloadImages: Checking extension (alternative)', ['ext' => $ext]); 308 $this->logger->debug('DownloadImages: Checking extension (alternative)', ['ext' => $ext]);
309 } 309 }
310 310
311 if (!in_array($ext, ['jpeg', 'jpg', 'gif', 'png'], true)) { 311 if (!\in_array($ext, ['jpeg', 'jpg', 'gif', 'png'], true)) {
312 $this->logger->error('DownloadImages: Processed image with not allowed extension. Skipping: ' . $imagePath); 312 $this->logger->error('DownloadImages: Processed image with not allowed extension. Skipping: ' . $imagePath);
313 313
314 return false; 314 return false;