Answers.Body: <p>This is a problem related to php 8 that is fixed in civi 5.59. It will be released in about a week.</p>
  <p><a href="https://lab.civicrm.org/dev/core/-/issues/2301" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/2301</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-01T02:08:17.950Z
Answers.Text: Thank you for your answer
Answers.UserDisplayName: Alessandro Bronzo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-28T00:02:42.247Z
Answers.LastActivityDate: 2023-02-28T00:02:42.247Z
Answers.UserDisplayName: Demerit
Body: <p>everybody. I have an error every time that an existent user saves the contact profile data in drupal, associated to civicrm fields. The Drupal's user data are updated correctly. The error is a bad one (the website encounter an error...), but it's enough to go back and everything is fine. It's recorded in PHP and Drupal watchdog. Could you please help me debugging it? I tried deleting some fields, but it doesn't work. It seems that the data are saved, anyway, but the error is confusing for the users.
  The first three lines of the error:</p>
  <p>[27-Feb-2023 00:42:48 Europe/Rome] TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/user/droopler/priv_files/civicrm/templates_c/it_IT/%%4D/4DC/4DC76B26%%body.tpl.php on line 15</p>
  <p>#0 /home/user/droopler/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1915): include()</p>
  <p>#1 /home/user/droopler/priv_files/civicrm/templates_c/it_IT/%%0A/0AF/0AF6F87E%%Dynamic.tpl.php(43): Smarty-&gt;_smarty_include(Array)</p>
  
Tags: <drupal><contacts><drupal-9>
Title: Error saving CiviCrm profile card in Drupal's user area
ThreadText: # Error saving CiviCrm profile card in Drupal's user area
  
  (Asked by: username_0 on 2023-02-27)
  
  everybody. I have an error every time that an existent user saves the contact profile data in drupal, associated to civicrm fields. The Drupal's user data are updated correctly. The error is a bad one (the website encounter an error...), but it's enough to go back and everything is fine. It's recorded in PHP and Drupal watchdog. Could you please help me debugging it? I tried deleting some fields, but it doesn't work. It seems that the data are saved, anyway, but the error is confusing for the users.
  The first three lines of the error:
  
  [27-Feb-2023 00:42:48 Europe/Rome] TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home/user/droopler/priv\_files/civicrm/templates\_c/it\_IT/%%4D/4DC/4DC76B26%%body.tpl.php on line 15
  
  #0 /home/user/droopler/vendor/civicrm/civicrm-packages/Smarty/Smarty.class.php(1915): include()
  
  #1 /home/user/droopler/priv\_files/civicrm/templates\_c/it\_IT/%%0A/0AF/0AF6F87E%%Dynamic.tpl.php(43): Smarty->\_smarty\_include(Array)
  
  **Tags:** drupal, contacts, drupal-9
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-02-28. Score: 0 | Accepted answer
  
  This is a problem related to php 8 that is fixed in civi 5.59. It will be released in about a week.
  
  <https://lab.civicrm.org/dev/core/-/issues/2301>
  
  > **Comments:**
  > **username_0**: Thank you for your answer  
  
  ---
  
  