After I updated the extension to 1.7, uploading zip files stopped working. Here's the error:
[2024-12-25 07:28:22] flarum.ERROR: TypeError: FoF\Upload\Repositories\FileRepository::sanitizeSvg(): Argument #2 ($mime) must be of type string, null given, called in /home/customer/www/myforum.com/public_html/forum/vendor/fof/upload/src/Commands/UploadHandler.php on line 72 and defined in /home/customer/www/myforum.com/public_html/forum/vendor/fof/upload/src/Repositories/FileRepository.php:342
Stack trace:
#0 /home/customer/www/myforum.com/public_html/forum/vendor/fof/upload/src/Commands/UploadHandler.php(72): FoF\Upload\Repositories\FileRepository->sanitizeSvg(Object(Symfony\Component\HttpFoundation\File\UploadedFile), NULL)
#1 [internal function]: FoF\Upload\Commands\UploadHandler->{closure:FoF\Upload\Commands\UploadHandler::handle():64}(Object(Laminas\Diactoros\UploadedFile), 0)
#2 /home/customer/www/myforum.com/public_html/forum/vendor/illuminate/collections/Collection.php(695): array_map(Object(Closure), Array, Array)
#3 /home/customer/www/myforum.com/public_html/forum/vendor/fof/upload/src/Commands/UploadHandler.php(64): Illuminate\Support\Collection->map(Object(Closure))
#4 /home/customer/www/myforum.com/public_html/forum/vendor/illuminate/bus/Dispatcher.php(122): FoF\Upload\Commands\UploadHandler->handle(Object(FoF\Upload\Commands\Upload))
#5 /home/customer/www/myforum.com/public_html/forum/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->{closure:Illuminate\Bus\Dispatcher::dispatchNow():119}(Object(FoF\Upload\Commands\Upload))
#6 /home/customer/www/myforum.com/public_html/forum/vendor/illuminate/pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->{closure:Illuminate\Pipeline\Pipeline::prepareDestination():126}(Object(FoF\Upload\Commands\Upload))
#7 /home/customer/www/myforum.com/public_html/forum/vendor/illuminate/bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#8 /home/customer/www/myforum.com/public_html/forum/vendor/illuminate/bus/Dispatcher.php(78): Illuminate\Bus\Dispatcher->dispatchNow(Object(FoF\Upload\Commands\Upload))
#9 /home/customer/www/myforum.com/public_html/forum/vendor/fof/upload/src/Api/Controllers/UploadController.php(60): Illuminate\Bus\Dispatcher->dispatch(Object(FoF\Upload\Commands\Upload))
#10 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php(116): FoF\Upload\Api\Controllers\UploadController->data(Object(Laminas\Diactoros\ServerRequest), Object(Tobscure\JsonApi\Document))
#11 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(41): Flarum\Api\Controller\AbstractSerializeController->handle(Object(Laminas\Diactoros\ServerRequest))
#12 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/ExecuteRoute.php(27): Flarum\Http\RouteHandlerFactory->{closure:Flarum\Http\RouteHandlerFactory::toController():36}(Object(Laminas\Diactoros\ServerRequest), Array)
#13 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\ExecuteRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Closure))
#14 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Api/Middleware/ThrottleApi.php(33): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#15 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Api\Middleware\ThrottleApi->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#16 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(44): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#17 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\CheckCsrfToken->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#18 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php(69): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#19 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\ResolveRoute->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#20 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(51): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#21 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\SetLocale->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#22 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(58): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#23 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\AuthenticateWithHeader->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#24 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(31): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#25 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\AuthenticateWithSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#26 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(52): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#27 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\RememberFromCookie->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#28 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#29 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\StartSession->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#30 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#31 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Api\Middleware\FakeHttpMethods->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#32 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#33 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\ParseJsonBody->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#34 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#35 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\HandleErrors->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#36 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#37 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\InjectActorReference->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#38 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(81): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#39 /home/customer/www/myforum.com/public_html/forum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#40 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Middlewares\RequestHandler->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#41 /home/customer/www/myforum.com/public_html/forum/vendor/middlewares/base-path-router/src/BasePathRouter.php(99): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#42 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Middlewares\BasePathRouter->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#43 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#44 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Laminas\Stratigility\Middleware\OriginalMessages->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#45 /home/customer/www/myforum.com/public_html/forum/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#46 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Middlewares\BasePath->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#47 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#48 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/Next.php(52): Flarum\Http\Middleware\ProcessIp->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\Next))
#49 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(81): Laminas\Stratigility\Next->handle(Object(Laminas\Diactoros\ServerRequest))
#50 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(70): Laminas\Stratigility\MiddlewarePipe->process(Object(Laminas\Diactoros\ServerRequest), Object(Laminas\Stratigility\EmptyPipelineHandler))
#51 /home/customer/www/myforum.com/public_html/forum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(73): Laminas\Stratigility\MiddlewarePipe->handle(Object(Laminas\Diactoros\ServerRequest))
#52 /home/customer/www/myforum.com/public_html/forum/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#53 /home/customer/www/myforum.com/public_html/forum/index.php(26): Flarum\Http\Server->listen()
#54 {main}
Here's my forum info:
Flarum core: 1.8.9
PHP version: 8.4.1
MySQL version: 8.0.39-30
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, json, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, SPL, mbstring, session, standard, mysqlnd, mysqli, pcntl, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, random, readline, Reflection, exif, shmop, SimpleXML, soap, sockets, sodium, sysvmsg, sysvsem, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache
+-------------------------------------------+---------+--------+
| Flarum Extensions | | |
+-------------------------------------------+---------+--------+
| ID | Version | Commit |
+-------------------------------------------+---------+--------+
| flarum-flags | v1.8.2 | |
| flarum-approval | v1.8.2 | |
| flarum-tags | v1.8.3 | |
| flarum-suspend | v1.8.4 | |
| flarum-bbcode | v1.8.0 | |
| fof-pages | 1.0.8 | |
| fof-byobu | 1.3.9 | |
| flarum-mentions | v1.8.5 | |
| flarum-subscriptions | v1.8.1 | |
| afrux-forum-widgets-core | v0.1.7 | |
| flamarkt-backoffice | 0.1.4 | |
| flarum-markdown | v1.8.1 | |
| zerosonesfun-inline-audio | 3.0 | |
| v17development-seo | v2.0.5 | |
| sycho-move-posts | v0.1.8 | |
| rob006-last-post-avatar | 1.2.4 | |
| kilowhat-rich-embeds | 1.3.1 | |
| fof-user-directory | 1.3.3 | |
| fof-user-bio | 1.4.2 | |
| fof-upload | 1.7.0 | |
| fof-sitemap | 2.2.1 | |
| fof-polls | 2.2.11 | |
| fof-nightmode | 1.6.0 | |
| fof-merge-discussions | 1.4.1 | |
| fof-links | 1.3.0 | |
| fof-ignore-users | 1.2.1 | |
| fof-forum-statistics-widget | 1.2.1 | |
| fof-formatting | 1.0.3 | |
| fof-follow-tags | 1.2.7 | |
| fof-ban-ips | 1.1.2 | |
| fof-anti-spam | 1.1.2 | |
| flarum-sticky | v1.8.2 | |
| flarum-statistics | v1.8.1 | |
| flarum-pusher | v1.8.1 | |
| flarum-nicknames | v1.8.2 | |
| flarum-lock | v1.8.2 | |
| flarum-likes | v1.8.1 | |
| flarum-lang-english | v1.8.0 | |
| flarum-emoji | v1.8.1 | |
| ekumanov-online-users-widget | v1.0.7 | |
| davwheat-session-keepalive | 1.1.0 | |
| clarkwinkelmann-selective-mediaembed | 1.0.1 | |
| clarkwinkelmann-post-stream-search | 1.1.0 | |
| clarkwinkelmann-advanced-search-highlight | 1.0.2 | |
| blomstra-turnstile | 0.1.6 | |
| blomstra-spam-prevention | 1.8.0 | |
| blomstra-mark-unread | 0.2.0 | |
| blomstra-database-queue | 1.1.0 | |
| askvortsov-rich-text | v2.1.7 | |
| askvortsov-pwa | v3.4.1 | |
| askvortsov-markdown-tables | v1.2.1 | |
+-------------------------------------------+---------+--------+
Base URL: https://myforum.com/forum
Installation path: /home/customer/www/myforum.com/public_html/forum
Queue driver: database
Session driver: file
Scheduler status: Active
Mail driver: smtp
Debug mode: off
Here's what testing the file in the extension settings produces: