Skip to content

Commit

Permalink
Merge pull request #17666 from eileenmcnaughton/entity_log
Browse files Browse the repository at this point in the history
Throw exception if id not passed into discard
  • Loading branch information
mlutfy authored Jun 22, 2020
2 parents 6217c68 + 29d68d5 commit f12d958
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Contact/BAO/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public static function retrieve(&$params, &$defaults) {
* @param int $id Group id.
*/
public static function discard($id) {
if (!$id || !is_numeric($id)) {
throw new CRM_Core_Exception('Invalid group request attempted');
}
CRM_Utils_Hook::pre('delete', 'Group', $id, CRM_Core_DAO::$_nullArray);

$transaction = new CRM_Core_Transaction();
Expand Down

0 comments on commit f12d958

Please sign in to comment.