From 4ed4143d21ec402ac4edd9df4e816748a532288f Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Wed, 26 Jul 2023 12:02:18 +0200 Subject: [PATCH] Post class: declare $attachments property This should avoid PHP notices like this one when running PHP 8.2: PHP Deprecated: Creation of dynamic property Activitypub\Transformer\Post::$attachments is deprecated in /var/www/html/wp-content/plugins/activitypub/includes/transformer/class-post.php on line 249 --- includes/transformer/class-post.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/transformer/class-post.php b/includes/transformer/class-post.php index 69dcf89..6f1fed3 100644 --- a/includes/transformer/class-post.php +++ b/includes/transformer/class-post.php @@ -28,6 +28,13 @@ class Post { */ protected $wp_post; + /** + * Attachment images, used in the content. + * + * @var array + */ + protected $attachments = array(); + /** * The Allowed Tags, used in the content. *