Make WordPress Core

Opened 3 weeks ago

Last modified 44 hours ago

#51466 new defect (bug)

Site Health: don't give a warning when post_max_size is set to 0 (unlimited)

Reported by: pixolin Owned by:
Milestone: 5.7 Priority: normal
Severity: normal Version: 5.5.1
Component: Site Health Keywords: needs-patch 2nd-opinion
Focuses: Cc:


Site health displays a warning, if the post_max_size PHP value is lower than upload_max_filesize.

This is wrong, if post_max_size is set to "unlimited" (value 0) (see Description of core php.ini directives).

Change History (5)

#1 @SergeyBiryukov
3 weeks ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.6

#2 @SergeyBiryukov
3 weeks ago

Good catch, thanks for the report!

Just noting this is related to [48806] / #50945.

#3 @Clorith
3 weeks ago

  • Keywords 2nd-opinion added

Hmmm, I'm not sure if this should change, as the documentation mentions there are scenarios where a value of 0 means a literal zero as well.

The current implementation provides a recommendation if the value is lower than the upload_max_filersize setting, and I think it's reasonable to retain it as a recommendation then, as it may benefit from changing to something specific, but it's not a critical issue if you leave it as it is. Would love a 2nd opinion on this though.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.

44 hours ago

#5 @helen
44 hours ago

  • Milestone changed from 5.6 to 5.7

The setting for %1$s is smaller than %2$s, this could cause some problems when trying to upload files.

I agree that the warning itself is incorrect and should be fixed; however, I think there's some room to debate whether it should still trigger a warning about it not being set to a good default value. The message isn't severely incorrect or alarming so I'm going to move this out of 5.6 for the moment because I don't see anybody working on it, but if there's an approach+patch very soon it could probably make its way back in.

Note: See TracTickets for help on using tickets.