From 47b2326dff34401883eac877bed4493d05a9cbf0 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Wed, 13 Mar 2019 20:54:18 +0100 Subject: [PATCH 1/3] Fixing missing extension index in js_upload --- js_upload/js_upload.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php index b115e961e..22948b1c7 100644 --- a/js_upload/js_upload.php +++ b/js_upload/js_upload.php @@ -14,6 +14,7 @@ * Module Author: Chris Case * */ + use Friendica\Core\Config; use Friendica\Core\Hook; use Friendica\Core\L10n; @@ -333,7 +334,10 @@ class qqFileUploader { $pathinfo = pathinfo($this->file->getName()); $filename = $pathinfo['filename']; - $ext = $pathinfo['extension']; + if (!isset($pathinfo['extension'])) { + Logger::warning('extension isn\'t set.', ['filename' => $filename]); + } + $ext = defaults($pathinfo, 'extension', ''); if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){ $these = implode(', ', $this->allowedExtensions); From dcf4b5695d2ade796e5dedcf3b3312913d60ebc5 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Wed, 13 Mar 2019 20:58:54 +0100 Subject: [PATCH 2/3] Fix wrong intends in js_upload --- js_upload/js_upload.php | 246 ++++++++++++++++++++-------------------- 1 file changed, 123 insertions(+), 123 deletions(-) diff --git a/js_upload/js_upload.php b/js_upload/js_upload.php index 22948b1c7..95d62aa68 100644 --- a/js_upload/js_upload.php +++ b/js_upload/js_upload.php @@ -62,38 +62,38 @@ function js_upload_form(&$a,&$b) {