MDL-70823 mod: safely parse module display options array.

This commit is contained in:
Paul Holden
2021-11-03 16:57:15 +01:00
committed by Sara Arjona
parent 294fa223c9
commit cdc80e6bfd
9 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ page_view($page, $course, $cm, $context);
$PAGE->set_url('/mod/page/view.php', array('id' => $cm->id));
$options = empty($page->displayoptions) ? array() : unserialize($page->displayoptions);
$options = empty($page->displayoptions) ? [] : (array) unserialize_array($page->displayoptions);
if ($inpopup and $page->display == RESOURCELIB_DISPLAY_POPUP) {
$PAGE->set_pagelayout('popup');