From: moodler <moodler> Date: Thu, 1 Feb 2007 07:02:28 +0000 (+0000) Subject: Add some robustness to the tabs so we can use tabs named '0' X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f522d310fdef5ff8943d462116340c7e590c37e4;p=moodle.git Add some robustness to the tabs so we can use tabs named '0' --- 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) {