From c719dc0b1dd696e0cd6b51f09ee13c8263375f7c Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 7 Sep 2011 09:57:38 +0000
Subject: [PATCH] Fixed a warning in maildrop plugin.

---
 server/plugins-available/maildrop_plugin.inc.php | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/server/plugins-available/maildrop_plugin.inc.php b/server/plugins-available/maildrop_plugin.inc.php
index 74437faf72..085a99283a 100644
--- a/server/plugins-available/maildrop_plugin.inc.php
+++ b/server/plugins-available/maildrop_plugin.inc.php
@@ -211,10 +211,14 @@ class maildrop_plugin {
 					unset($config_file_path);
 				} else {
 					// Delete the mailfilter recipe
-					$email_parts = explode("@",$data["old"]["email"]);
-					$file = $this->mailfilter_config_dir.'/'.$email_parts[1].'/'.$email_parts[0].'/.mailfilter';
-					if(is_file($file)) unlink($file)  or $app->log("Unable to delete file: $file",LOGLEVEL_WARN);
-					$app->log("Deleting custom Mailfiter".$file,LOGLEVEL_DEBUG);
+					if(isset($data["old"]["email"])) {
+						$email_parts = explode("@",$data["old"]["email"]);
+						$file = $this->mailfilter_config_dir.'/'.$email_parts[1].'/'.$email_parts[0].'/.mailfilter';
+						if(is_file($file)) {
+							unlink($file)  or $app->log("Unable to delete file: $file",LOGLEVEL_WARN);
+							$app->log("Deleting custom Mailfiter".$file,LOGLEVEL_DEBUG);
+						}
+					}
 				}
 		}
 	}
-- 
GitLab