From 567984fa345749bb2dbc4b3f59b405db4e69e485 Mon Sep 17 00:00:00 2001 From: Filippo Rossi Date: Sun, 4 Dec 2016 18:59:48 +0100 Subject: [PATCH] Fixed warning 'Invalid argument passed for foreach()' when watching a thread --- inc/plugins/thunderboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/plugins/thunderboard.php b/inc/plugins/thunderboard.php index 3d19827..4ec50db 100644 --- a/inc/plugins/thunderboard.php +++ b/inc/plugins/thunderboard.php @@ -637,7 +637,7 @@ function thunderboard_replace(&$contents) // if the stylesheet is already available foreach (['global', $mybb->get_input('action')] as $pageAction) { - foreach ($theme['stylesheets'][basename($_SERVER['PHP_SELF'])][$pageAction] as $pageSpecificStylesheet) { + foreach ((array) $theme['stylesheets'][basename($_SERVER['PHP_SELF'])][$pageAction] as $pageSpecificStylesheet) { if ($pageSpecificStylesheet == $plainLink) { $specific = true;