Permalink
Browse files

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

  • Loading branch information...
1 parent 178d996 commit 0ad7caf4c38f995092d5ecfc838b615e16c2ca21 @timhunt timhunt committed with stronk7 Jan 16, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/blocklib.php
View
@@ -1280,7 +1280,7 @@ public function process_url_edit() {
// 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 {

0 comments on commit 0ad7caf

Please sign in to comment.