NotifySend.php
authorAlan Knowles <alan@roojs.com>
Thu, 20 Aug 2015 02:14:12 +0000 (10:14 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 20 Aug 2015 02:14:12 +0000 (10:14 +0800)
NotifySend.php

index 47d834c..55d0105 100644 (file)
@@ -166,7 +166,12 @@ class Pman_Core_NotifySend extends Pman
                 'ontable' => $w->ontable,
                 'onid' => $w->onid,
         );
-        $lar[strtolower($w->person_table).'_id'] = $w->{strtolower($w->person_table).'_id'};
+        // only newer version of the database us this..
+        $personid_col = strtolower($w->person_table).'_id';
+        if (isset($w->{$personid_col})) {
+            $lar[$personid_col] = $w->{$personid_col};
+        }
+        
         
         $l->setFrom( $lar );       
         $l->whereAdd('id != '. $w->id);