MDL-42021 events: Debug message when objecttable set without an objectid

This commit is contained in:
Frederic Massart 2013-09-27 14:13:30 +08:00
parent 7f3836d15a
commit 31e571cdf0
3 changed files with 18 additions and 3 deletions

View file

@ -463,6 +463,9 @@ abstract class base implements \IteratorAggregate {
if (!$DB->get_manager()->table_exists($this->data['objecttable'])) {
debugging('Unknown table specified in objecttable field', DEBUG_DEVELOPER);
}
if (!isset($this->data['objectid'])) {
debugging('Event property objectid must be set when objecttable is defined', DEBUG_DEVELOPER);
}
}
}
}