From: Marek Bachmann Date: Wed, 30 Nov 2022 01:16:04 +0000 (+0100) Subject: Fixed meaning of "maximagesize" = 0 --> infinity X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2794100cbc3276f296237af5d4fd89738cccc29b;hp=49db6469228b62b932c7059b13d6174e4e8957d6;p=friendica.git Fixed meaning of "maximagesize" = 0 --> infinity --- diff --git a/mod/photos.php b/mod/photos.php index 8671c39495..d31f8daab5 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -918,7 +918,10 @@ function photos_content(App $a) // Get the relevant size limits for uploads. Abbreviated var names: MaxImageSize -> mis; upload_max_filesize -> umf $mis_bytes = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')); $umf_bytes = Strings::getBytesFromShorthand(ini_get('upload_max_filesize')); - + // Per Friendica definition a value of '0' mean unlimited: + If ($mis_bytes == 0) { + $mis_bytes = INF; + } // When PHP is configured with upload_max_filesize less than maximagesize provide this lower limit. $maximagesize_Mbytes = (is_numeric($mis_bytes) && ($mis_bytes < $umf_bytes) ? $mis_bytes : $umf_bytes) / (1048576);