PluginProbe
User Access Manager / 2.3.4
User Access Manager v2.3.4
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/Object/ObjectHandler.php +5 -5 2.3.152.3.4 View file →
@@ -48,13 +48,13 @@
48 48 private ?array $postTypes = null;
49 49 /** @var WP_Taxonomy[] */
50 50 private ?array $taxonomies = null;
51 51 /** @var WP_User[] */
52 - private array $users = [];
52 + private ?array $users = null;
53 53 /** @var WP_Post[] */
54 - private array $posts = [];
54 + private ?array $posts = null;
55 55 /** @var WP_Term[] */
56 - private array $terms = [];
56 + private ?array $terms = null;
57 57 private ?array $objectMembershipHandlers = null;
58 58 private ?array $objectTypes = null;
59 59 private ?array $allObjectTypesMap = null;
60 60 private ?array $allObjectTypes = null;
@@ -84,9 +84,9 @@
84 84
85 85 return $this->taxonomies;
86 86 }
87 87
88 - public function getUser(int|string|null $id): WP_User|bool
88 + public function getUser(int|string $id): WP_User|bool
89 89 {
90 90 if (isset($this->users[$id]) === false) {
91 91 $this->users[$id] = $this->wordpress->getUserData($id);
92 92 }
@@ -103,9 +103,9 @@
103 103
104 104 return $this->posts[$id];
105 105 }
106 106
107 - public function getTerm(int|string|null $id, string $taxonomy = ''): WP_Term|bool
107 + public function getTerm(int|string $id, string $taxonomy = ''): WP_Term|bool
108 108 {
109 109 $fullId = $id . '|' . $taxonomy;
110 110
111 111 if (isset($this->terms[$fullId]) === false) {