]> git.mxchange.org Git - friendica.git/commitdiff
Wrap last remaining system.maximagesize config retrieval in Strings::getBytesFromShor...
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 28 Apr 2023 03:09:33 +0000 (23:09 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 28 Apr 2023 03:09:48 +0000 (23:09 -0400)
- Address https://github.com/friendica/friendica/issues/13023#issuecomment-1520073381

src/Module/Api/Mastodon/InstanceV2.php

index e006c8263f061ac3d4c426f634d6ef188d70d218..402e0ae93c9fa06a0871092e0462676c46c2ae58 100644 (file)
@@ -35,6 +35,7 @@ use Friendica\Module\Register;
 use Friendica\Object\Api\Mastodon\InstanceV2 as InstanceEntity;
 use Friendica\Util\Images;
 use Friendica\Util\Profiler;
+use Friendica\Util\Strings;
 use Psr\Log\LoggerInterface;
 
 /**
@@ -112,7 +113,7 @@ class InstanceV2 extends BaseApi
                        $this->config->get('config', 'max_import_size')
                ));
 
-               $image_size_limit = $this->config->get('system', 'maximagesize');
+               $image_size_limit = Strings::getBytesFromShorthand($this->config->get('system', 'maximagesize'));
 
                return new InstanceEntity\Configuration(
                        $statuses_config,