- Affected version
- 2.0 Beta 1
Most of the Search data handlers explicitly bypass entity getters when accessing title/messages. None of these have a getter by default, so the stock extra cost is 1 extra boolean check.
This would just cause surprises if an add-on later implements a getter on these.
Using the regex;
These matches are entity getters, so it is expected they are using this;
But these search handlers use it;
This would just cause surprises if an add-on later implements a getter on these.
Using the regex;
Code:
->[a-zA-Z]+_[;,\s]
These matches are entity getters, so it is expected they are using this;
Code:
src\XF\Entity\SessionActivity.php (1 hit)
Line 12: $params = $this->params_;
src\XF\Entity\SpamTriggerLog.php (1 hit)
Line 14: foreach ($this->details_ AS $detail)
But these search handlers use it;
Code:
src\XF\Search\Data\Post.php (1 hit)
Line 44: 'message' => $entity->message_,
src\XF\Search\Data\ProfilePost.php (1 hit)
Line 34: 'message' => $entity->message_,
src\XF\Search\Data\ProfilePostComment.php (1 hit)
Line 34: 'message' => $entity->message_,
src\XF\Search\Data\Thread.php (2 hits)
Line 38: 'title' => $entity->title_,
Line 39: 'message' => $firstPost ? $firstPost->message_ : '',