define('GNUSOCIAL_ENGINE', 'GNU social');
define('GNUSOCIAL_ENGINE_URL', 'https://www.gnu.org/software/social/');
-define('GNUSOCIAL_BASE_VERSION', '1.22.0');
+define('GNUSOCIAL_BASE_VERSION', '1.22.1');
define('GNUSOCIAL_LIFECYCLE', 'dev'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
define('GNUSOCIAL_VERSION', GNUSOCIAL_BASE_VERSION . '-' . GNUSOCIAL_LIFECYCLE);
*/
function _common_size_str_to_int($size) : int
{
- if (empty($size)) {
+ // `memory_limit` can be -1 and `post_max_size` can be 0
+ // for unlimited. Consistency.
+ if (empty($size) || $size === '-1' || $size === '0') {
return 5000000;
}
/**
* Uses `_common_size_str_to_int()` to find the smallest value for uploads in php.ini
*
- * @returns int
+ * @return int
*/
-function common_get_preferred_php_upload_limit() {
+function common_get_preferred_php_upload_limit() : int {
return min(_common_size_str_to_int(ini_get('post_max_size')),
_common_size_str_to_int(ini_get('upload_max_filesize')),
_common_size_str_to_int(ini_get('memory_limit')));