From d8e1346b782c21e54bda341b188acece0dbd68ee Mon Sep 17 00:00:00 2001 From: im-mi Date: Thu, 18 Aug 2016 15:15:28 -0400 Subject: [PATCH 1/2] Replace deprecated DefaultType directive --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 7fdf0a5a..8e33b6f3 100644 --- a/.htaccess +++ b/.htaccess @@ -48,9 +48,9 @@ AddOutputFilterByType DEFLATE application/x-javascript application/javascript -DefaultType image/jpeg AddType audio/mp4 f4a f4b m4a AddType audio/ogg oga ogg opus +AddType image/jpeg jpg jpeg AddType image/bmp bmp AddType image/svg+xml svg svgz AddType image/webp webp From 8fe92128823b00cafc18f24a08734869437d98c1 Mon Sep 17 00:00:00 2001 From: im-mi Date: Fri, 19 Aug 2016 15:16:53 -0400 Subject: [PATCH 2/2] Fixed assertion failure upon upload due to incorrect type check --- ext/upload/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/upload/main.php b/ext/upload/main.php index da3d3430..524f751b 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -291,7 +291,7 @@ class Upload extends Extension { /** * Handle an upload. - * @param string $file + * @param string[] $file * @param string[] $tags * @param string|null $source * @param int $replace @@ -299,7 +299,7 @@ class Upload extends Extension { */ private function try_upload($file, $tags, $source, $replace=-1) { global $page; - assert('is_string($file)'); + assert('is_array($file)'); assert('is_array($tags)'); assert('is_string($source) || is_null($source)'); assert('is_int($replace)');