Networks and Sites: Ensure fileupload_maxk is an int to avoid potential fatal errors.

This changeset fixes a potential fatal error, for example when "Max upload file size" setting is set to an empty value. It also adds unit tests for `upload_size_limit_filter`.

Props mjkhajeh, bhrugesh12, SergeyBiryukov, kebbet, audrasjb, felipeelia.
Fixes #55926.


git-svn-id: https://develop.svn.wordpress.org/trunk@54482 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2022-10-11 15:05:29 +00:00
parent e2c6f8c82a
commit 525d6d2a34
3 changed files with 54 additions and 3 deletions

View File

@@ -4771,6 +4771,7 @@ function sanitize_option( $option, $value ) {
case 'users_can_register':
case 'start_of_week':
case 'site_icon':
case 'fileupload_maxk':
$value = absint( $value );
break;