[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 14:30:50 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 needs-testing  |     Focuses:  administration, multisite
--------------------------------+----------------------------------------
Changes (by iandunn):

 * owner:  (none) => iandunn
 * priority:  high => highest omg bbq
 * status:  new => accepted
 * severity:  major => blocker


Comment:

 Ah, I can reproduce this now.

 It looks like 5.5 set the transient in `get_dirsize`, and included the
 `size` sub-array. When that logic was moved to `recurse_dirsize`, the
 `size` subarray was removed, probably because it seems unnecessary. That
 caused a conflict between the structure of new and old transients, though.

 https://core.trac.wordpress.org/browser/branches/5.5/src/wp-
 includes/functions.php?rev=49453&marks=7518-7520#L7490

 https://core.trac.wordpress.org/browser/branches/5.6/src/wp-
 includes/functions.php?rev=49643&marks=7708#L7705

 The simplest fix might be to clear the transient during the upgrade. If
 that won't work, then maybe the 5.6 code should be updated to save the
 `size` item?

 I'll look into those options, but let me know if anyone has any thoughts.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51913#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list