From a23f04ca2f35785ec5bc0839fad41ebf15deb0ee Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 14 Jan 2013 18:25:07 +0000 Subject: [PATCH] Log an error if trying to merge and app has not implemented bo_tracking->id_field, and skip the merge --- etemplate/inc/class.bo_tracking.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php index d1ea1acc23..da64ae21e6 100644 --- a/etemplate/inc/class.bo_tracking.inc.php +++ b/etemplate/inc/class.bo_tracking.inc.php @@ -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();