From 5e8039b5239dab82b7a3de04041a2cef0b0a88a7 Mon Sep 17 00:00:00 2001 From: Nikita Sinelnikov Date: Thu, 16 Sep 2021 15:40:11 +0300 Subject: [PATCH] - fixed empty max_size data for the uploaders; --- includes/core/class-fields.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 8ecc9915..7d37106f 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -1757,7 +1757,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) { if ( ! isset( $array['max_files_error'] ) ) { $array['max_files_error'] = __( 'You can only upload one image', 'ultimate-member' ); } - if ( ! isset( $array['max_size'] ) ) { + if ( empty( $array['max_size'] ) ) { $array['max_size'] = 999999999; } if ( ! isset( $array['upload_help_text'] ) ) { @@ -1798,7 +1798,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) { if ( ! isset( $array['max_files_error'] ) ) { $array['max_files_error'] = __( 'You can only upload one file', 'ultimate-member' ); } - if ( ! isset( $array['max_size'] ) ) { + if ( empty( $array['max_size'] ) ) { $array['max_size'] = 999999999; } if ( ! isset( $array['upload_help_text'] ) ) {