[wp-trac] [WordPress Trac] #51913: Potential `unsupported operand types` dashboard fatal on PHP8 + multisite + upload space check
WordPress Trac
noreply at wordpress.org
Wed Dec 2 16:06:20 UTC 2020
#51913: Potential `unsupported operand types` dashboard fatal on PHP8 + multisite +
upload space check
-----------------------------+----------------------------------------
Reporter: iandunn | Owner: iandunn
Type: defect (bug) | Status: accepted
Priority: highest omg bbq | Milestone: 5.6
Component: Administration | Version:
Severity: blocker | Resolution:
Keywords: php8 | Focuses: administration, multisite
-----------------------------+----------------------------------------
Comment (by janthiel):
@iandunn The only line of code that could trigger the mentioned behaviour
should be this:
https://core.trac.wordpress.org/browser/branches/5.6/src/wp-
includes/functions.php?rev=49643&marks=7639#L7639
This is the only direct return of an existing transient value. For the
main site it might resolve and actually return the previously stored array
['size' => 12345].
Each other case should return "fresh" or no values due to the new way how
the cache paths are actually stored per month.
Resetting the transient will not help, if there are plugins using own code
to write it. So I would suggest adding a check in the aforementioned line
to see whether the return is an actual int before returning early? That
should catch backward-compat and plugin issues.
What do you think?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51913#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list