From e4863a1668409064580e2ac15ef86203cc600c30 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 16 Jan 2013 12:38:04 +0000 Subject: [PATCH] MDL-31616 blocks: ensure showinsubcontexts is only 0 or 1 in the DB. --- lib/blocklib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/blocklib.php b/lib/blocklib.php index 682fae1fd07..5066ae557b7 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -1294,7 +1294,7 @@ class block_manager { // This may get overwritten by the special case handling below. $bi->pagetypepattern = $data->bui_pagetypepattern; - $bi->showinsubcontexts = $data->bui_contexts; + $bi->showinsubcontexts = (bool) $data->bui_contexts; if (empty($data->bui_subpagepattern) || $data->bui_subpagepattern == '%@NULL@%') { $bi->subpagepattern = null; } else {