NotifySend.php
authorAlan Knowles <alan@akbkhome.com>
Tue, 23 Aug 2011 07:53:50 +0000 (15:53 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 23 Aug 2011 07:53:50 +0000 (15:53 +0800)
NotifySend.php

index 27081e0..1de843b 100644 (file)
@@ -132,15 +132,17 @@ class Pman_Core_NotifySend extends Pman
         
         $email =  $this->makeEmail($o, $p, $last, $w);
         
-        if ($email === false) {
+        if ($email === false || isset($email['error'])) {
             // object returned 'false' - it does not know how to send it..
-            $id = $this->addEvent('NOTIFY', $w, "INTERNAL ERROR  - We can not handle " . $w->ontable);;
+            $id = $this->addEvent('NOTIFY', $w, isset($email['error'])  ?
+                            $email['error'] : "INTERNAL ERROR  - We can not handle " . $w->ontable);;
             $ww = clone($w);
             $w->sent = date('Y-m-d H:i:s');
             $w->msgid = '';
             $w->event_id = $id;
             $w->update($ww);
-            die(date('Y-m-d h:i:s') . "INTERNAL ERROR  - We can not handle " . $w->ontable);
+            die(date('Y-m-d h:i:s') . isset($email['error'])  ?
+                            $email['error'] : "INTERNAL ERROR  - We can not handle " . $w->ontable);
         }