Answers.Body: <p>A roll back to php 7.4 along with deletion of template_c files seems to bring back a working environment. As in, php7.4 does not fatal error on this however the issue persists.. Just tested in Drupal 7 as well and any change with search preferences causes things to break.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-03T03:23:37.770Z
Answers.LastActivityDate: 2022-12-03T23:34:25.993Z
Answers.LastEditDate: 2022-12-03T23:34:25.993Z
Answers.UserDisplayName: Eldon Leeburstroghm Allison II
Answers.Body: <p>I'm guessing this has been a bug for a while, not strictly related to php 8, it just crashes with php 8. Can you file an issue at <a href="https://lab.civicrm.org" rel="nofollow noreferrer">https://lab.civicrm.org</a> with the stack trace?</p>
  <p>By the way drupal 9 will run with php 7.4 and it won't be removed from drupal 9, just drupal 10.</p>
  <p>EDIT: Fix is at <a href="https://github.com/civicrm/civicrm-core/pull/25170" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/25170</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-03T02:30:12.807Z
Answers.Text: Thanks for that, drupal Fails on the update screens because of php 7.4 . I will open an issue thanks!
Answers.UserDisplayName: Eldon Leeburstroghm Allison II
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-03T15:22:20.567Z
Answers.Text: Ok I see what you mean if you're not already on 9.4 then it gives a warning about 7.4 that looks like a fail but it's just a warning and you can click continue, or use drush.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-03T15:39:20.510Z
Answers.Text: yeah, for sure.. this issue is fatal on php8 and wonky in 7.4. pretty sure I just figured out why.  see https://civicrm.stackexchange.com/q/43074/14046 I will update the Issue as well.. Feeling much better today ..
Answers.UserDisplayName: Eldon Leeburstroghm Allison II
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-12-02T23:21:26.493Z
Answers.LastActivityDate: 2022-12-14T15:44:48.010Z
Answers.LastEditDate: 2022-12-14T15:44:48.010Z
Answers.UserDisplayName: Demerit
Body: <p>PHP 8 TypeError I encountered when making adjustments to the search preferences, unchecking not needed fields and checking new custom fields. no autocomplete drop down anymore and when I TRY to go back into search preferences, a fatal error is thrown with:</p>
  <p><code>The website encountered an unexpected error. Please try again later. TypeError: array_flip(): Argument #1 ($array) must be of type array, string given in array_flip() (line 380 of /code/vendor/civicrm/civicrm-core/CRM/Admin/Form/SettingTrait.php). array_flip('external_identifiersort_namecitycustom_Annuity_Balancecustom_PAP_Balancecustom_Pension_Credits_to_Date') (Line: 380) CRM_Admin_Form_Setting::reorderSortableOptions('quicksearch_options', Array) (Line: 224) CRM_Admin_Form_Setting-&gt;addFieldsDefinedInSettingsMetadata() (Line: 66) CRM_Admin_Form_Setting-&gt;buildQuickForm() (Line: 47) CRM_Admin_Form_Setting_Search-&gt;buildQuickForm() (Line: 689) CRM_Core_Form-&gt;buildForm() (Line: 76).... and more..</code></p>
  <p>Is this just because of php 8? I am on Drupal 9 and it requires php 8, but will work on 7.4, i thinks.. ? any fixes on the horizon?</p>
  
Tags: <drupal-9><php8>
Title: Is -TypeError: array_flip(): Argument #1 must be of type array, string given- a php 8, Drupal 9, civicrm 5.55.2 or all combined Issue?
ThreadText: # Is -TypeError: array_flip(): Argument #1 must be of type array, string given- a php 8, Drupal 9, civicrm 5.55.2 or all combined Issue?
  
  (Asked by: username_0 on 2022-12-02)
  
  PHP 8 TypeError I encountered when making adjustments to the search preferences, unchecking not needed fields and checking new custom fields. no autocomplete drop down anymore and when I TRY to go back into search preferences, a fatal error is thrown with:
  
  `The website encountered an unexpected error. Please try again later. TypeError: array_flip(): Argument #1 ($array) must be of type array, string given in array_flip() (line 380 of /code/vendor/civicrm/civicrm-core/CRM/Admin/Form/SettingTrait.php). array_flip('external_identifiersort_namecitycustom_Annuity_Balancecustom_PAP_Balancecustom_Pension_Credits_to_Date') (Line: 380) CRM_Admin_Form_Setting::reorderSortableOptions('quicksearch_options', Array) (Line: 224) CRM_Admin_Form_Setting->addFieldsDefinedInSettingsMetadata() (Line: 66) CRM_Admin_Form_Setting->buildQuickForm() (Line: 47) CRM_Admin_Form_Setting_Search->buildQuickForm() (Line: 689) CRM_Core_Form->buildForm() (Line: 76).... and more..`
  
  Is this just because of php 8? I am on Drupal 9 and it requires php 8, but will work on 7.4, i thinks.. ? any fixes on the horizon?
  
  **Tags:** drupal-9, php8
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2022-12-03. Score: 1
  
  A roll back to php 7.4 along with deletion of template\_c files seems to bring back a working environment. As in, php7.4 does not fatal error on this however the issue persists.. Just tested in Drupal 7 as well and any change with search preferences causes things to break.
  
  
  ---
  
  ### Answer by username_1 on 2022-12-02. Score: 1
  
  I'm guessing this has been a bug for a while, not strictly related to php 8, it just crashes with php 8. Can you file an issue at <https://lab.civicrm.org> with the stack trace?
  
  By the way drupal 9 will run with php 7.4 and it won't be removed from drupal 9, just drupal 10.
  
  EDIT: Fix is at <https://github.com/civicrm/civicrm-core/pull/25170>
  
  > **Comments:**
  > **username_0**: Thanks for that, drupal Fails on the update screens because of php 7.4 . I will open an issue thanks!  
  > **username_1**: Ok I see what you mean if you're not already on 9.4 then it gives a warning about 7.4 that looks like a fail but it's just a warning and you can click continue, or use drush.  
  > **username_0**: yeah, for sure.. this issue is fatal on php8 and wonky in 7.4. pretty sure I just figured out why.  see https://civicrm.stackexchange.com/q/43074/14046 I will update the Issue as well.. Feeling much better today ..  
  
  ---
  
  