MDL-31006 fix various notices in PHP54

PHP54 compatibility
This commit is contained in:
Petr Skoda
2012-01-18 01:03:20 +01:00
committed by Eloy Lafuente (stronk7)
parent ae924874d7
commit b85b25ebb8
34 changed files with 71 additions and 17 deletions
+8
View File
@@ -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();