Merge branch 'wip-MDL-34189-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Sam Hemelryk 2014-07-29 16:15:24 +12:00
commit efe3aefaf2
10 changed files with 383 additions and 48 deletions

View file

@ -5156,7 +5156,7 @@ abstract class context extends stdClass implements IteratorAggregate {
* @return void (modifies $rec)
*/
protected static function preload_from_record(stdClass $rec) {
if (empty($rec->ctxid) or empty($rec->ctxlevel) or empty($rec->ctxinstance) or empty($rec->ctxpath) or empty($rec->ctxdepth)) {
if (empty($rec->ctxid) or empty($rec->ctxlevel) or !isset($rec->ctxinstance) or empty($rec->ctxpath) or empty($rec->ctxdepth)) {
// $rec does not have enough data, passed here repeatedly or context does not exist yet
return;
}