diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2018-09-05 14:25:32 +0200 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2018-09-05 14:25:32 +0200 |
commit | 2a1ceb67b4400f46f4d3067e887ff54aa906f0a2 (patch) | |
tree | df0b695eb99e96dc55b63b27a404080c23421639 /src/Wallabag/CoreBundle/Helper/DownloadImages.php | |
parent | 685a5d745e2b723a09111d7d31157cced67ea9b4 (diff) | |
download | wallabag-2a1ceb67b4400f46f4d3067e887ff54aa906f0a2.tar.gz wallabag-2a1ceb67b4400f46f4d3067e887ff54aa906f0a2.tar.zst wallabag-2a1ceb67b4400f46f4d3067e887ff54aa906f0a2.zip |
php-cs-fixer
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/DownloadImages.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/DownloadImages.php | 4 |
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; |