DragonByte Tech
Well-known member
- Affected version
- 2.3.0
Problem: The
Fixes:
thread
context isn't being correctly checked to ensure it is of instance XF\Entity\Thread
. Fixes:
Diff:
Index: src/XF/Widget/FeaturedContent.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/XF/Widget/FeaturedContent.php b/src/XF/Widget/FeaturedContent.php
--- a/src/XF/Widget/FeaturedContent.php
+++ b/src/XF/Widget/FeaturedContent.php
@@ -130,7 +130,7 @@
}
$thread = $this->contextParams['thread'] ?? null;
- if ($thread && $forum instanceof Thread)
+ if ($thread && $thread instanceof Thread)
{
return [
'content_type' => 'thread',
Diff:
Index: src/XF/Widget/TrendingContent.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/XF/Widget/TrendingContent.php b/src/XF/Widget/TrendingContent.php
--- a/src/XF/Widget/TrendingContent.php
+++ b/src/XF/Widget/TrendingContent.php
@@ -108,7 +108,7 @@
}
$thread = $this->contextParams['thread'] ?? null;
- if ($thread && $forum instanceof Thread)
+ if ($thread && $thread instanceof Thread)
{
return [
'content_type' => 'thread',