From 7b5ae294c691370c12a1a2a143a6074fc6480157 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 19 Dec 2017 15:44:11 -0500 Subject: [PATCH] adding better checking for the ismoderated flag when sending admin notifications adding another conditional to compare member ids with the request data before sending the notification to the admin --- models/admin/forSale/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/admin/forSale/index.php b/models/admin/forSale/index.php index d76366c..7d5c1bf 100644 --- a/models/admin/forSale/index.php +++ b/models/admin/forSale/index.php @@ -222,7 +222,9 @@ class GlmMembersAdmin_forSale_index extends GlmDataForSale $itemAddError = true; } if($isModerated){ - $notification->sendAdminNotice($memberID, $item); + if ( isset( $_REQUEST['member'] ) && $memberID = filter_var( $_REQUEST['member'] ) ) { + $notification->sendAdminNotice($memberID, $item); + } } $view_file = 'edit'; -- 2.17.1