MDL-31006 fix various notices in PHP54
PHP54 compatibility
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
ae924874d7
commit
b85b25ebb8
@@ -829,6 +829,10 @@ function filter_get_all_local_settings($contextid) {
|
||||
function filter_get_active_in_context($context) {
|
||||
global $DB, $FILTERLIB_PRIVATE;
|
||||
|
||||
if (!isset($FILTERLIB_PRIVATE)) {
|
||||
$FILTERLIB_PRIVATE = new stdClass();
|
||||
}
|
||||
|
||||
// Use cache (this is a within-request cache only) if available. See
|
||||
// function filter_preload_activities.
|
||||
if (isset($FILTERLIB_PRIVATE->active) &&
|
||||
@@ -877,6 +881,10 @@ function filter_get_active_in_context($context) {
|
||||
function filter_preload_activities(course_modinfo $modinfo) {
|
||||
global $DB, $FILTERLIB_PRIVATE;
|
||||
|
||||
if (!isset($FILTERLIB_PRIVATE)) {
|
||||
$FILTERLIB_PRIVATE = new stdClass();
|
||||
}
|
||||
|
||||
// Don't repeat preload
|
||||
if (!isset($FILTERLIB_PRIVATE->preloaded)) {
|
||||
$FILTERLIB_PRIVATE->preloaded = array();
|
||||
|
||||
Reference in New Issue
Block a user