Add a check if the group ID is array.
Throws an error saying:
TypeError: array_map(): Argument #2 ($array) must be of type array, string given in array_map() (line 2941 of /var/www/web/israelscouts.org-d9/vendor/civicrm/civicrm-core/CRM/Core/DAO.php).
It can be reproduced by the following steps:
- Go to Search > Find Contacts.
- Search for a contact.
- Tick the checkbox for any contact and select "Group - create smart group" under "Actions".
- Error is thrown.
Edited by arnfrench