From f522d310fdef5ff8943d462116340c7e590c37e4 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 1 Feb 2007 07:02:28 +0000 Subject: [PATCH] Add some robustness to the tabs so we can use tabs named '0' --- lib/weblib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index abdd7934d8..d3b500fc13 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5469,9 +5469,9 @@ function convert_tabrows_to_tree($tabrows, $selected, $inactive, $activated) { $tree = array(); foreach ($row as $tab) { - $tab->inactive = in_array($tab->id, $inactive); - $tab->active = in_array($tab->id, $activated); - $tab->selected = $tab->id == $selected; + $tab->inactive = in_array((string)$tab->id, $inactive); + $tab->active = in_array((string)$tab->id, $activated); + $tab->selected = (string)$tab->id == $selected; if ($tab->active || $tab->selected) { if ($subtree) { -- 2.39.5