Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
290 stars 205 forks source link

Define dynamic guest_authors property #947

Closed GaryJones closed 1 year ago

GaryJones commented 1 year ago

Description

Dynamic properties are deprecated in PHP 8.2. This PR explicitly defines a class property. It needs to stay public as it is referenced in other classes directly.

Deploy Notes

None

Steps to Test

With PHP 8.2, a message of:

PHP message: Deprecated: Creation of dynamic property CoAuthors_Plus::$guest_authors is deprecated in /var/www/wp-content/plugins/co-authors-plus/co-authors-plus.php on line 158

...would be logged. After applying the patch, this will no longer appear.