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:44 +01:00
committed by Eloy Lafuente (stronk7)
parent 178d99677b
commit 0ad7caf4c3
+1 -1
View File
@@ -1280,7 +1280,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 {