Answers.Body: <p>Based on comments this was tracked down to extensions. @andy-clark looked at the installed extensions and an older version of the CiviCalendar extension was creating the string error.</p>
  
  <p>Also the Summary Fields extension was creating deprecated warnings.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-19T13:26:15.333Z
Answers.LastActivityDate: 2020-03-19T13:26:15.333Z
Answers.UserDisplayName: Demerit
Body: <p>I'm getting the following message about 3 or 4 times a day from cron. Nothing is showing up in the error log and I'm puzzled.  This follows moving the site from one host to another which must be a clue.  Civi is working fine except for this error message. The site is Drupal based, release 5.19.4 and PHP 7.3.15.
  After putting in the line suggested by Demerit, here's the new trace, the problem occurred once today.<p><b>Warning</b>:  array_intersect_assoc(): Expected parameter 1 to be an array, string given in <b>/home/example/public_html/sites/all/modules/civicrm/Civi/Core/SettingsMetadata.php</b> on line <b>150</b><br />
  <br />
  <b>Warning</b>:  array_intersect_assoc(): Expected parameter 1 to be an array, string given in <b>/home/example/public_html/sites/all/modules/civicrm/Civi/Core/SettingsMetadata.php</b> on line <b>150</b><br />
  <br />
  <b>Warning</b>:  array_intersect_assoc(): Expected parameter 1 to be an array, string given in <b>/home/example/public_html/sites/all/modules/civicrm/Civi/Core/SettingsMetadata.php</b> on line <b>150</b><br />
  <br />
  <b>Warning</b>:  array_intersect_assoc(): Expected parameter 1 to be an array, string given in <b>/home/example/public_html/sites/all/modules/civicrm/Civi/Core/SettingsMetadata.php</b> on line <b>150</b><br />
  <br />
  <b>Warning</b>:  session_start(): Cannot start session when headers already sent in <b>/home/example/public_html/sites/all/modules/civicrm/CRM/Core/Session.php</b> on line <b>124</b><br /></p>
  
  <p> And here what was in ConfigAndLog at the time the problem occurred
  </p>
  
  <p>Mar 18 02:15:02  [info] ddd DD</p>
  
  <p>Mar 18 02:15:02  [info] month</p>
  
  <p>Mar 18 02:15:02  [info] 500</p>
  
  <p>Mar 18 02:15:02  [info] en_GB</p>
  
  <p>Mar 18 02:15:02  [warning] Deprecated Path: There is a setting (generate_schema_and_data) not correctly defined. You may see unpredictability due to this. CRM_Core_Setting::setItems
  Array
  (
      [civi.tag] => deprecated
  )</p>
  
  <p>Mar 18 02:15:04  [warning] Deprecated Path: There is a setting (generate_schema_and_data) not correctly defined. You may see unpredictability due to this. CRM_Core_Setting::setItems
  Array
  (
      [civi.tag] => deprecated
  )</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-15T18:56:58.853Z
Comments.Text: To debug, just before line 149 add `if (is_string($fieldValues)) { CRM_Core_Error::debug_log_message($fieldValues); }` and then that should at least give a clue in ConfigAndLog as to what.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-15T19:25:58.953Z
Comments.Text: Thanks - have done so, will let you know
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-16T08:30:25.500Z
Comments.Text: That caused a fatal error, but revealed the problem?
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-16T08:43:31.633Z
Comments.Text: Here's the trace partly edited to keep within the character limit:
   <b>Fatal error</b>:  Uncaught Error: Class 'Civi\Core\CRM_Core_Error' not found in /home/example/public_html/sites/all/modules/civicrm/Civi/Core
  #2 /home/example/public_html/sites/all/modules/civicrm/Civi/Core/SettingsManager.php(118): Civi\Core\SettingsManager-&gt;getDefaults('domain')
  #3 /home/examplen/public_html/sites/all/modules/civicrm/CRM/Core/Config.php(126):
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-16T12:56:40.517Z
Comments.Text: That's weird. Seems like a classloader problem? Maybe could you edit the original question to post the whole trace, and also show the command you're using to run cron?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-16T14:52:37.150Z
Comments.Text: Oh the fatal error is my mistake. It's because inside the Civi folder references to non-namespaced classes need to be prefixed. So need to put a \ in front, i.e. `if (is_string($fieldValues)) { \CRM_Core_Error::debug_log_message($fieldValues); }`
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-16T14:55:23.053Z
Comments.Text: I re-saved the domain info (administer/localisation/languages/currency/locations and since then have had no messages. So if it reoccurs I'll add the \ in.  Thx for help!
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-18T15:22:40.223Z
Comments.Text: I see you edited the question - do you mean it happened again? If so, did it output anything in ConfigAndLog saying what the value of $fieldValues is? It's possible it's blank, so you would just see a line with date and time and then nothing else on the line, and then in that case you'd need to try to log the value of some other variables in that block to see what's going on.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-18T15:32:41.557Z
Comments.Text: I added what was in ConfigAndLog to the question
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-18T17:29:59.800Z
Comments.Text: I'm not familiar with a setting called "generate_schema_and_data". Do you have any extensions?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-18T17:37:48.093Z
Comments.Text: Lots of extensions! 19 in all.  I'll try and find where that message comes from. As I'm only getting the error around once a day then pulling the extensions isn't very practical
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-18T17:47:10.037Z
Comments.Text: Can you grep the extensions for "generate_schema_and_data"? That might find it.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-19T10:14:14.217Z
Comments.Text: The 'ddd DD' and '500' messages comes from the Calendar extension by Agilway. The 'generate_schema' from the Summary Fiellds extension (one of the most popular).  I guess it's the Calendar extension that's the problem, so I'll follow this up.  Do you want to add this as an answer?
Comments.UserDisplayName: Andy Clark
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-19T10:49:20.103Z
Comments.Text: The Calendar extension is at version 1.0 and the current version is 3.4 - Version 1.0 didn't do any version checking.  So I will install the updated version, which should hopefully fix this problem.
Comments.UserDisplayName: Andy Clark
Tags: <drupal><error>
Title: Getting error message from cron but no clue why - can anyone help?
ThreadText: # Getting error message from cron but no clue why - can anyone help?
  
  (Asked by: username_0 on 2020-03-15)
  
  I'm getting the following message about 3 or 4 times a day from cron. Nothing is showing up in the error log and I'm puzzled. This follows moving the site from one host to another which must be a clue. Civi is working fine except for this error message. The site is Drupal based, release 5.19.4 and PHP 7.3.15.
  After putting in the line suggested by username_1, here's the new trace, the problem occurred once today.
  
  **Warning**: array\_intersect\_assoc(): Expected parameter 1 to be an array, string given in **/home/example/public\_html/sites/all/modules/civicrm/Civi/Core/SettingsMetadata.php** on line **150**  
    
  **Warning**: array\_intersect\_assoc(): Expected parameter 1 to be an array, string given in **/home/example/public\_html/sites/all/modules/civicrm/Civi/Core/SettingsMetadata.php** on line **150**  
    
  **Warning**: array\_intersect\_assoc(): Expected parameter 1 to be an array, string given in **/home/example/public\_html/sites/all/modules/civicrm/Civi/Core/SettingsMetadata.php** on line **150**  
    
  **Warning**: array\_intersect\_assoc(): Expected parameter 1 to be an array, string given in **/home/example/public\_html/sites/all/modules/civicrm/Civi/Core/SettingsMetadata.php** on line **150**  
    
  **Warning**: session\_start(): Cannot start session when headers already sent in **/home/example/public\_html/sites/all/modules/civicrm/CRM/Core/Session.php** on line **124**
  
  And here what was in ConfigAndLog at the time the problem occurred
  
  Mar 18 02:15:02 [info] ddd DD
  
  Mar 18 02:15:02 [info] month
  
  Mar 18 02:15:02 [info] 500
  
  Mar 18 02:15:02 [info] en\_GB
  
  Mar 18 02:15:02 [warning] Deprecated Path: There is a setting (generate\_schema\_and\_data) not correctly defined. You may see unpredictability due to this. CRM\_Core\_Setting::setItems
  Array
  (
  [civi.tag] => deprecated
  )
  
  Mar 18 02:15:04 [warning] Deprecated Path: There is a setting (generate\_schema\_and\_data) not correctly defined. You may see unpredictability due to this. CRM\_Core\_Setting::setItems
  Array
  (
  [civi.tag] => deprecated
  )
  
  **Tags:** drupal, error
  
  > **Comments:**
  > **username_1**: To debug, just before line 149 add `if (is_string($fieldValues)) { CRM_Core_Error::debug_log_message($fieldValues); }` and then that should at least give a clue in ConfigAndLog as to what.  
  > **username_0**: Thanks - have done so, will let you know  
  > **username_0**: That caused a fatal error, but revealed the problem?  
  > **username_0**: Here's the trace partly edited to keep within the character limit:  <b>Fatal error</b>:  Uncaught Error: Class 'Civi\Core\CRM_Core_Error' not found in /home/example/public_html/sites/all/modules/civicrm/Civi/Core #2 /home/example/public_html/sites/all/modules/civicrm/Civi/Core/SettingsManager.php(118): Civi\Core\SettingsManager-&gt;getDefaults('domain') #3 /home/examplen/public_html/sites/all/modules/civicrm/CRM/Core/Config.php(126):  
  > **username_1**: That's weird. Seems like a classloader problem? Maybe could you edit the original question to post the whole trace, and also show the command you're using to run cron?  
  > **username_1**: Oh the fatal error is my mistake. It's because inside the Civi folder references to non-namespaced classes need to be prefixed. So need to put a \ in front, i.e. `if (is_string($fieldValues)) { \CRM_Core_Error::debug_log_message($fieldValues); }`  
  > **username_0**: I re-saved the domain info (administer/localisation/languages/currency/locations and since then have had no messages. So if it reoccurs I'll add the \ in.  Thx for help!  
  > **username_1**: I see you edited the question - do you mean it happened again? If so, did it output anything in ConfigAndLog saying what the value of $fieldValues is? It's possible it's blank, so you would just see a line with date and time and then nothing else on the line, and then in that case you'd need to try to log the value of some other variables in that block to see what's going on.  
  > **username_0**: I added what was in ConfigAndLog to the question  
  > **username_1**: I'm not familiar with a setting called "generate_schema_and_data". Do you have any extensions?  
  > **username_0**: Lots of extensions! 19 in all.  I'll try and find where that message comes from. As I'm only getting the error around once a day then pulling the extensions isn't very practical  
  > **username_1**: Can you grep the extensions for "generate_schema_and_data"? That might find it.  
  > **username_0**: The 'ddd DD' and '500' messages comes from the Calendar extension by Agilway. The 'generate_schema' from the Summary Fiellds extension (one of the most popular).  I guess it's the Calendar extension that's the problem, so I'll follow this up.  Do you want to add this as an answer?  
  > **username_0**: The Calendar extension is at version 1.0 and the current version is 3.4 - Version 1.0 didn't do any version checking.  So I will install the updated version, which should hopefully fix this problem.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-03-19. Score: 2
  
  Based on comments this was tracked down to extensions. @andy-clark looked at the installed extensions and an older version of the CiviCalendar extension was creating the string error.
  
  Also the Summary Fields extension was creating deprecated warnings.
  
  
  ---
  
  