[wp-trac] [WordPress Trac] #61675: wp-activate.php tries to set undefined property
WordPress Trac
noreply at wordpress.org
Wed Jul 17 16:00:22 UTC 2024
#61675: wp-activate.php tries to set undefined property
-------------------------------+-------------------------------------------
Reporter: skithund | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Networks and | Version:
Sites |
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: multisite, php-compatibility
-------------------------------+-------------------------------------------
Changes (by jrf):
* keywords: has-patch => needs-patch
Comment:
@skithund Thank you for reporting this. This shouldn't be possible with
the WP native object cache classes as the `#[AllowDynamicProperties]`
attribute is set.
Having said this, as the property is explicitly used and set in WP Core, I
think it would be prudent to make this property an explicitly declared one
on the `WP_Object_Cache` class anyhow (visibility: `public`) with
documentation stating that "overload" classes should declare that
property.
As for existing "overload" classes, I believe patches would be needed to
explicitly declare the property on those as well.
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.
Also see: https://3v4l.org/kLAYu
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61675#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list