From ab523042d163875e8011d1fe3a8f715522798a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Wrede?= Date: Thu, 13 Jul 2023 16:26:05 +0200 Subject: [PATCH] PHP Deprecation: Fix creation of dynamic property. (#413) --- src/Comment_Command.php | 2 ++ src/Post_Command.php | 2 ++ src/Post_Term_Command.php | 2 ++ src/Site_Command.php | 2 ++ src/User_Command.php | 1 + src/User_Meta_Command.php | 2 ++ 6 files changed, 11 insertions(+) diff --git a/src/Comment_Command.php b/src/Comment_Command.php index ff021730a..ebbc56c58 100644 --- a/src/Comment_Command.php +++ b/src/Comment_Command.php @@ -41,6 +41,8 @@ class Comment_Command extends CommandWithDBObject { 'comment_author_email', ]; + private $fetcher; + public function __construct() { $this->fetcher = new CommentFetcher(); } diff --git a/src/Post_Command.php b/src/Post_Command.php index 5947b3f49..797dcd350 100644 --- a/src/Post_Command.php +++ b/src/Post_Command.php @@ -36,6 +36,8 @@ class Post_Command extends CommandWithDBObject { 'post_status', ]; + private $fetcher; + public function __construct() { $this->fetcher = new PostFetcher(); } diff --git a/src/Post_Term_Command.php b/src/Post_Term_Command.php index 548065e12..f27040ba7 100644 --- a/src/Post_Term_Command.php +++ b/src/Post_Term_Command.php @@ -33,6 +33,8 @@ class Post_Term_Command extends CommandWithTerms { protected $obj_type = 'post'; + private $fetcher; + public function __construct() { $this->fetcher = new PostFetcher(); } diff --git a/src/Site_Command.php b/src/Site_Command.php index e6f4d0634..4c2449e83 100644 --- a/src/Site_Command.php +++ b/src/Site_Command.php @@ -33,6 +33,8 @@ class Site_Command extends CommandWithDBObject { protected $obj_type = 'site'; protected $obj_id_key = 'blog_id'; + private $fetcher; + public function __construct() { $this->fetcher = new SiteFetcher(); } diff --git a/src/User_Command.php b/src/User_Command.php index baf7a72c5..78dcbea05 100644 --- a/src/User_Command.php +++ b/src/User_Command.php @@ -48,6 +48,7 @@ class User_Command extends CommandWithDBObject { private $cap_fields = [ 'name', ]; + private $fetcher; public function __construct() { $this->fetcher = new UserFetcher(); diff --git a/src/User_Meta_Command.php b/src/User_Meta_Command.php index 04ad11392..48d0974db 100644 --- a/src/User_Meta_Command.php +++ b/src/User_Meta_Command.php @@ -33,6 +33,8 @@ class User_Meta_Command extends CommandWithMeta { protected $meta_type = 'user'; + private $fetcher; + public function __construct() { $this->fetcher = new UserFetcher(); }