mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 22:45:39 +00:00
This avoids a fatal error on PHP 8 caused by passing a zero value to `fread()` as the `$length` argument, which must be greater than zero. This commit also amends the previous solution for similar issues elsewhere in the file to ensure consistent type for string values, instead of changing the type from `string` to `bool` when trying to read from an empty file. Follow-up to [50355]. Props DavidAnderson, jrf, SergeyBiryukov. Merges [51686] to the 5.8 branch. Fixes #54036. Built from https://develop.svn.wordpress.org/branches/5.8@51694 git-svn-id: http://core.svn.wordpress.org/branches/5.8@51300 1a063a9b-81f0-0310-95a4-ce76da25c4cd