From 5ddf30983eeb08507ba2eadfdbe1ee63068dd776 Mon Sep 17 00:00:00 2001 From: Sean Hickey Date: Fri, 20 Dec 2013 05:10:09 -0500 Subject: [PATCH] Undefined property: Notification::$mail I'm not 100% sure this is a bug, but I'm getting the following error from my crons. > PHP Notice: Undefined property: Notification::$mail in /var/www/MPOS/public/include/classes/notification.class.php on line 158 > PHP Fatal error: Call to a member function getError() on a non-object in /var/www/MPOS/public/include/classes/notification.class.php on line 158 It appears the `Notification` class extends the `Mail` class instead of `Base`, in which case `$this->mail` does not exist. --- public/include/classes/notification.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/include/classes/notification.class.php b/public/include/classes/notification.class.php index ddf59e9c..b11f990c 100644 --- a/public/include/classes/notification.class.php +++ b/public/include/classes/notification.class.php @@ -155,7 +155,7 @@ class Notification extends Mail { if ($stmt->close() && $this->sendMail('notifications/' . $strType, $aMailData) && $this->addNotification($account_id, $strType, $aMailData)) { return true; } else { - $this->setErrorMessage('SendMail call failed: ' . $this->mail->getError()); + $this->setErrorMessage('SendMail call failed: ' . $this->getError()); return false; } } else {