File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -211,10 +211,14 @@ function update($event_name,$data) {
211211 unset($ config_file_path );
212212 } else {
213213 // Delete the mailfilter recipe
214- $ email_parts = explode ("@ " ,$ data ["old " ]["email " ]);
215- $ file = $ this ->mailfilter_config_dir .'/ ' .$ email_parts [1 ].'/ ' .$ email_parts [0 ].'/.mailfilter ' ;
216- if (is_file ($ file )) unlink ($ file ) or $ app ->log ("Unable to delete file: $ file " ,LOGLEVEL_WARN );
217- $ app ->log ("Deleting custom Mailfiter " .$ file ,LOGLEVEL_DEBUG );
214+ if (isset ($ data ["old " ]["email " ])) {
215+ $ email_parts = explode ("@ " ,$ data ["old " ]["email " ]);
216+ $ file = $ this ->mailfilter_config_dir .'/ ' .$ email_parts [1 ].'/ ' .$ email_parts [0 ].'/.mailfilter ' ;
217+ if (is_file ($ file )) {
218+ unlink ($ file ) or $ app ->log ("Unable to delete file: $ file " ,LOGLEVEL_WARN );
219+ $ app ->log ("Deleting custom Mailfiter " .$ file ,LOGLEVEL_DEBUG );
220+ }
221+ }
218222 }
219223 }
220224 }
You can’t perform that action at this time.
0 commit comments