Permalink
Browse files

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

  • Loading branch information...
1 parent 460ab53 commit 67cc80197f0c18a8e2ad0f79f3ad885249b12ee6 @timhunt timhunt committed with stronk7 Jan 16, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/blocklib.php
View
2 lib/blocklib.php
@@ -1294,7 +1294,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 67cc801

Please sign in to comment.