Hi there,
I got the following errors bellow in the drupal system i just installed.
#1. warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 169.
#2. warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 129.
I believe both are related to the fact that i imported the site from another server.
I debugged the error and i went to the respective file
/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php
The first error is in the function static function retrieve(&$defaults)
line 169 if ( array_key_exists( $skip, $defaults ) ) { ...
The second error is in the function static function formatParams(&$params, &$values)
line 129 if ( array_key_exists($key, $values)) { ...
The vars $defaults and $values are arguments of the functions and they are used on those lines but somehow they have no value assigned to them, when i assume they were supposed to have one.
I understand i need to verify where those vars are set and fix the error.
Does anyone have an idea how to fix that?
Comments
Same problem
Did you ever figure this out? I am having the same issue.
Check table civicrm_domain
I have just encountered this problem on a site. The problem was in the table civicrm_domain, where the value for the field config_backend was invalid. You can change this to the value NULL to reload the default settings from the settings file (civicrm.settings.php in /sites/default).
And obviously you need to make a backup of your database before you do this.
Erik