NotifySend.php
authorAlan Knowles <alan@roojs.com>
Thu, 28 Jan 2016 07:44:10 +0000 (15:44 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 28 Jan 2016 07:44:10 +0000 (15:44 +0800)
NotifySend.php

index cf501b4..ace03b6 100644 (file)
@@ -253,8 +253,10 @@ class Pman_Core_NotifySend extends Pman
          if (!empty($opts['send-to'])) {
             $p->email = $opts['send-to'];
         }
-        // since some of them have spaces?!?!
-        $p->email = trim($p->email);
+        if ($p) {
+            // since some of them have spaces?!?!
+            $p->email = trim($p->email);
+        }
         
         require_once 'Validate.php';
         if (!Validate::email($p->email, true)) {