[wp-trac] [WordPress Trac] #61675: wp-activate.php tries to set undefined property

WordPress Trac noreply at wordpress.org
Wed Oct 8 02:33:47 UTC 2025


#61675: wp-activate.php tries to set undefined property
-------------------------------+-------------------------------------------
 Reporter:  skithund           |       Owner:  spacedmonkey
     Type:  defect (bug)       |      Status:  assigned
 Priority:  normal             |   Milestone:  6.9
Component:  Networks and       |     Version:
  Sites                        |
 Severity:  normal             |  Resolution:
 Keywords:  has-patch early    |     Focuses:  multisite, php-compatibility
-------------------------------+-------------------------------------------

Comment (by SergeyBiryukov):

 Some history here:
 * [3011] introduced the `WP_Object_Cache::$cache_enabled` property along
 with the class.
 * [6539] removed the property when persistent cache was removed from core.
 * [https://mu.trac.wordpress.org/changeset/1298 mu:1298] introduced this
 check in both `wp-activate.php` and `wpmu_create_blog()`.
 * [https://mu.trac.wordpress.org/changeset/1319 mu:1319] then removed the
 check (“No need for this debugging code”), but only in
 `wpmu_create_blog()`.

 Older external object cache implementations, e.g.
 [https://plugins.trac.wordpress.org/browser/memcached/tags/4.0.0/object-
 cache.php?marks=137#L119 Memcached] or
 [https://plugins.trac.wordpress.org/browser/apc/tags/2.0.7/object-
 cache.php?marks=121#L112 APC], still declare the property, but it does not
 affect anything aside from being declared.

 > While the patch proposed protects against the deprecation notice, it
 does not work with magic methods in place (which the `WP_Object_Cache`
 class has), so as things are, it would effectively disable the cache in
 most cases, which would break the functionality, which I don't think is
 your intention.

 Rereading this again, it appears that attempting to disable the cache for
 `wp-activate.php` and `wpmu_create_blog()` was indeed the original
 intention here, but since it was subsequently removed from the latter, it
 should be safe to remove it from the former too, as this is a remnant from
 the WPMU merge and has not been doing anything in practice for the last 17
 years or so.

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


More information about the wp-trac mailing list