Answers.Body: <p>Regression from recent changes in <a href="https://github.com/civicrm/civicrm-backdrop/pull/150" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-backdrop/pull/150</a></p>
  <p>Fix: <a href="https://github.com/civicrm/civicrm-backdrop/pull/169/files" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-backdrop/pull/169/files</a></p>
  <p>Patch: <a href="https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-backdrop/pull/169.patch" rel="nofollow noreferrer">https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-backdrop/pull/169.patch</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-04T08:57:53.940Z
Answers.Text: I tried to change that line manually but now the error is:
     "max(): Argument #1 ($value) must contain at least one element"
  and in the log:
     "ValueError: max(): Argument #1 ($value) must contain at least one element in max() (line 586 of /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module)."
Answers.UserDisplayName: Steve
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-04T09:15:29.707Z
Answers.Text: I have updated my answer
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-06T05:50:46.227Z
Answers.Text: thanks but having patched the file I still get the same error registering new user to Backdrop:
    _civicrm_group_roles_validate_groups(): Argument #1 ($group_ids) must be of type array, null given, called in /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module on line 108
Answers.UserDisplayName: Steve
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-06T05:56:39.097Z
Answers.Text: And when trying the association:
    Undefined constant "rules"
  
  And I don't get it. If this patch has been there for almost a year, why it haven't made it to the current archive?
Answers.UserDisplayName: Steve
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-04T06:59:44.393Z
Answers.LastActivityDate: 2023-12-04T09:15:19.903Z
Answers.LastEditDate: 2023-12-04T09:15:19.903Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p><a href="https://civicrm.stackexchange.com/questions/45519/civicrm-membership-sync-module-for-backdrop">Similar question</a></p>
  <p>I've the same problem with new installation of CiviCRM in Backdrop on my own Debian 12 machine:</p>
  <pre><code>array_keys(): Argument #1 ($array) must be of type array, null given
  </code></pre>
  <p>when trying to set up a Association Rule for matching CiviCRM Group Administrators to Backdrop Role Administrator.</p>
  <p>In the log nothing more IMO:</p>
  <pre><code>TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 586 of /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module).
  
  Backdrop CMS: 1.26.2 PHP Version: 8.2.7 CiviCRM: 5.67.3
  </code></pre>
  
Tags: <civimember><error><backdrop>
Title: civicrm membership sync module for backdrop null array
ThreadText: # civicrm membership sync module for backdrop null array
  
  (Asked by: username_0 on 2023-12-04)
  
  Similar question
  I've the same problem with new installation of CiviCRM in Backdrop on my own Debian 12 machine:
  array_keys(): Argument #1 ($array) must be of type array, null given
  
  when trying to set up a Association Rule for matching CiviCRM Group Administrators to Backdrop Role Administrator.
  In the log nothing more IMO:
  TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 586 of /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module).
  
  Backdrop CMS: 1.26.2 PHP Version: 8.2.7 CiviCRM: 5.67.3
  
  **Tags:** civimember, error, backdrop
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-12-04. Score: 0
  
  Regression from recent changes in <https://github.com/civicrm/civicrm-backdrop/pull/150>
  
  Fix: <https://github.com/civicrm/civicrm-backdrop/pull/169/files>
  
  Patch: <https://patch-diff.githubusercontent.com/raw/civicrm/civicrm-backdrop/pull/169.patch>
  
  > **Comments:**
  > **username_0**: I tried to change that line manually but now the error is:    "max(): Argument #1 ($value) must contain at least one element" and in the log:    "ValueError: max(): Argument #1 ($value) must contain at least one element in max() (line 586 of /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module)."  
  > **username_1**: I have updated my answer  
  > **username_0**: thanks but having patched the file I still get the same error registering new user to Backdrop:   _civicrm_group_roles_validate_groups(): Argument #1 ($group_ids) must be of type array, null given, called in /var/www/html/backdrop/modules/civicrm/backdrop/modules/civicrm_group_roles/civicrm_group_roles.module on line 108  
  > **username_0**: And when trying the association:   Undefined constant "rules"  And I don't get it. If this patch has been there for almost a year, why it haven't made it to the current archive?  
  
  ---
  
  