MDL-31616 blocks: ensure showinsubcontexts is only 0 or 1 in the DB.

This commit is contained in:
Tim Hunt
2013-01-16 19:15:20 +01:00
committed by Eloy Lafuente (stronk7)
parent 9044bc2f8b
commit e4863a1668
+1 -1
View File
@@ -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 {