Log an error if trying to merge and app has not implemented bo_tracking->id_field, and skip the merge

This commit is contained in:
Nathan Gray 2013-01-14 18:25:07 +00:00
parent 66b95f54b6
commit a23f04ca2f

View File

@ -1047,8 +1047,11 @@ abstract class bo_tracking
protected function get_signature($data, $old, $receiver)
{
$config = config::read('notifications');
if(class_exists($this->app. '_merge'))
if(!isset($data[$this->id_field]))
{
error_log($this->app . ' did not properly implement bo_tracking->id_field. Merge skipped.');
}
elseif(class_exists($this->app. '_merge'))
{
$merge_class = $this->app.'_merge';
$merge = new $merge_class();